[Mediawiki-l] Inputbox-extension with {{FULLPAGENAME}}

Birger bweynants at gmail.com
Wed Oct 18 12:05:09 UTC 2006


Dear list,

I am trying to adapt the input-extension so that it could be possible
to let the inputbox create a page on a specific location that has been
specified in advance.

Example:
Step 1) The user types the text "SecondSubpage" into the inputbox
WHILE he/she is ON the page
"http://www.site.com/wiki/index.php/namespace:page/subpage". The user
pushes the create-button.
Step 2) The page is created, NOT on
http://www.site.com/wiki/index.php/SecondSubpage BUT on
http://www.site.com/wiki/index.php/namespace:page/subpage/SecondSubpage.

I have been thinking about using the {{FULLPAGENAME}}-magic word
instead of the {{PAGENAME}} that has been specified on line 67 of the
inputbox-extension
("$boxhtml=str_replace("{{PAGENAME}}",$parser->mTitle->getText(),$boxhtml);").
Unfortunately i cannot see how changes to this should be made. I think
 "$parser->mTitle->getNamespace(),getText()" is not correct but i
don't know how it should be correctly defined.

In order to use those magic words (like e.g. PAGENAME) within the
inputbox: should it be added like a "getboxoption" this way:
"getBoxOption($inputbox->boxhtml, $input, "boxhtml');" and when the
form is created "<input type="hidden" name="boxhtml"
value="{$this->boxhtml}" />" or am i seeing this all wrong? When i
tried this, in the url of the editbox-page i see
"boxhtml=the_page_name_the_input_box_is_on/the_name_of_the_subpage_of_that_page"
instead of the whole
"the_page_name_the_input_box_is_on/the_name_of_the_subpage_of_that_page"-thing
after the "title="-parameter. Does anyone have any idea of what is
going wrong here?

Thanks a lot in advance for any help!



More information about the MediaWiki-l mailing list