[Mediawiki-l] Make a Title object from URL
Paul Grinberg
gri6507 at yahoo.com
Mon Feb 11 13:14:34 UTC 2008
Hello,
I am writing an extension where the user can pass in either a wiki title
(i.e. "Some page", "Category:Something") or a full URL
(i.e. "http://my.domain.com/prefix/Some_page", "http://my.domain.com/prefix/Category:Something").
I would like to be able to take the user's input in either form and get a Title
object out of it. I can process the user input in regular wiki title form by
using newFromText() method, but I cannot figure out how to do the same for the
URL method (newFromURL() method does not seem to work). The idea is that
regardless of what input format the user provides, I should be able to get the
proper wiki Title for the page.
More information about the MediaWiki-l
mailing list