Extension talk:InputBox/Archive

For the page history, see also.

Is it possible to use this input box on other wiki's because i've tried it and the raw syntax displays as text, any idea's/help plese?

Installation
Download the file inputbox.php to the folder extensions of your MediaWiki installation. Add the line require_once(&quot;extensions/inputbox.php&quot;); to LocalSettings.php.

I HOPE INPUTBOX can preload any word
such as   xxxx.....

It would be good if ...
the button label "create article" can be customized, like "create city article".--Patrick 6 July 2005 10:22 (UTC)


 * Yes, that idea is good! I'd also like to be able to define a prefix for the created page. That way, I could place it on, say, Votes for deletion and only need to enter "Alpha" to create Votes for deletion/Alpha. As it is I'd have to manually enter the prefix each and every time I wanted to add a page. Master Thief Garrett 7 July 2005 21:10 (UTC)


 * Yup that is definitely a nice way to go, and furthermore you could customize the prefix at will, so you can create, for instance, a category by only putting the name, and the page Category:name would be created. 82.242.132.211 21:45, 8 October 2005 (UTC)

Copied from Talk:Inputbox


 * Yes, I would like to have an input box to create a page in a specific namespace, so the prefix idea would be really useful. —Celtic Minstrel 13:41, 11 March 2008 (UTC)

In w:Wikipedia:Village pump (proposals), Angela proposes using this extension to add messages to user talk pages, with the note that it only works for previously blank talk pages. To make this truly effective, it would seem expedient to add a third type, corresponding to the new section "+" functionality of talk pages. Arguably, such a type should insert " talk" into the namespace if not already present.

And would it be hard to add the facility to use an explicit message string rather than just a reference to a template?

Bovlb 04:55, 6 Jul 2005 (UTC)

bugzilla references

 * 1) 02805 (fixed) – "
 * This is still an issue. My wiki's main page is invalidated only because of this create form. Not sure about what is wrong, I believe a form can't be placed in a p, but I'm not 100% sure. Patheticcockroach 09:27, 23 March 2009 (UTC)

Inputbox on Meta
I found this extension on the very day I started looking for such a feature -- but only thanks to luck -- it'd be very neat if the page showed up in the search results for 'forms' or 'html forms' or 'HTML forms'!!! -- yet I don't know if it's possible?

type=comment
It would be great if you could choose to add the comment at the top instead of the bottom to get a list with the most reasent comments at the head. --213.115.0.20 13:46, 1 December 2005 (UTC)
 * +1! --80.109.61.51 10:39, 19 June 2006 (UTC)

Namespace Specific Searches
Does/could this extension support a parameter listing a set of specific namespaces to be searched? The URL for such searches appears to be in the form: ".../index.php/Special:Search?ns110=1&search=SEARCHTERM&searchx=Search"

Tdoyle 14:16, 17 January 2006 (UTC)


 * I second this! We would specifically like it for the Cookbook (namespace 102!). Also, we would like a FULLTEXT-only search box (like search2, but reversed) since searching for an article name in the cookbook is rather pointless. Kellen T 80.229.36.69 18:03, 6 April 2006 (UTC)

define namespace (type=create)
I added a couple of lines that allow to define the namespace the article will be created in. Could it also be included in regulary versions? I added a "namespace" parameter and changed the HTML-Code in getCreateForm as follows: namespace}:'.length) != '{$this->namespace}:') {document.createbox.title.value = '{$this->namespace}:' + document.createbox.pagename.value;} else {document.createbox.title.value = document.createbox.pagename.value;}">  preload}" /> editintro}" />  {$comment} defaulttext}" size="{$this->width}"/>{$this->br} buttonlabel}"/> (maybe, you might be able to realize that function easier ;) --Three Of Twelve 21:21, 24 January 2006 (UTC)


 * by removing the colon the subpage-function could be integrated and other prefixes, too --Three Of Twelve 18:18, 25 January 2006 (UTC)

MediaWiki v1.5: Output error
I'm getting a strange error running Inputbox with MediaWiki v1.5 ...

when i add a text inputbox to a page using the syntax described on the Help page i get the following output instead of a textbox when the page is rendered:

I'm very new to all of this but haven't any trouble installing extensions in the past. Unfortunately i don't even know where to begin looking for a solution. 72.139.230.29 22:16, 28 January 2006 (UTC)

I had the same problem. I solved it by moving the InputBox code to a template. The problem occured when the InputBox code was on the same page as a call to a template with http://meta.wikimedia.org/wiki/MenuTabs code. Now both MenuTabs code and InputBox code are in templates and I can use them on the same page. Michiel.82.170.134.93 20:56, 5 February 2006 (UTC)

editintro
Could this box be modified, so that the 'editintro' does work on existing articles? Currently, when editing existing articles, no header text appears, but I'd like for it to be possible for editors to specify that text should appear in special cases. For example, on the Wikipedia Reference Desk, it would be possible to include a reminder of the rules in a header above each edit window, so that newbies can be gently guided.

Is there a reason the editintro is ignored by default when editing existing pages? -- Ec5618 00:07, 29 January 2006 (UTC)

This is something that we at the Vietnamese Wikipedia would much like, because there's obviously a lot more you can do in wikitext than in HTML comments to make editing a page more user-friendly. – Minh Nguyễn (talk, contribs) 06:18, 18 February 2006 (UTC)

Add to a defined category
'''who use this? in my mediawii,1.82 i can't find this $text=$this->getPreloadedText($preload);'''

I wanted the extension to work from a category page and make a new page within the category from which it is created. I made the following changes and thought they may be useful to others. This is very much a hack, but feel free to incorporate it properly into the software if it's seen to be a good feature.

First, change the inputbox extension to include the following lines: In the function "renderinputbox" add this line near the others: getBoxOption($inputbox->catname,$input,'catname'); This allows you to pass the variable 'catname', which you define when you write the extension.

Under "class InputBox', add $catname to the variable listing.

Then, near the bottom of the file, add this line near the others for the form creation: catname}" />

Then, in article.php (in the includes folder), add in the following: Under "function getContent" add in: $catname = $wgRequest->getText( 'catname' ); So it reads in the variable.

Then, change: $text=$this->getPreloadedText($preload); to: $text=$this->getPreloadedText($preload,$catname); And another version about 15 lines down, to pass the variable to the function.

In function getPreloaded text, change the function call from: getPreloadedText($preload) to getPreloadedText($preload,$catname)

And finally, change: if($rev) { return $rev->getText; }           } to this: if($catname) { $cattext = "\n\n Category:" . $catname . ""; }           else { $cattext = ""; }           if($rev) { return $rev->getText. $cattext; }           }

That's it, you should be able to pass a category now. Change as you see fit to pass another variable to the page you're creating. Good luck!

Pre-box label
Can we get a label before the input box? æle ✆ 01:09, 17 February 2006 (UTC)


 * Take a look at the code - you should easily be able to hack that yourself, even without understanding PHP.--Eloquence 02:29, 17 February 2006 (UTC)


 * Curiously enough, the most recent code already has a "labeltext" option for boxes of type "search2":
 * This made my job a lot easier. :) æle ✆ 20:12, 18 February 2006 (UTC)
 * This made my job a lot easier. :) æle ✆ 20:12, 18 February 2006 (UTC)

bug? inputbox interrupts a numbered list
The inputbox is great but it seems to interrupt a numbered list:


 * 1) Green
 * 2) Red
 * 3) Blue
 * 4) New colors (add your own):
 * 5) Purple
 * 6) Orange


 * 1) Green
 * 2) Red
 * 3) Blue
 * 4) New colors (add your own):
 * 5) Purple
 * 6) Orange

Any idea on how to fix? Arghman 22:35, 23 February 2006 (UTC)


 * The InputBox is wrapped in a    element, forcing it to be block level. The sanitiser is probably cleaning up what it sees as a still-open    container; or the browser is ignoring the invalid XHTML. This isn't an InputBox-specific problem. Rob Church Talk 07:30, 9 March 2006 (UTC)

error message
Hi I'm *very* new to MediaWiki and installing an inputbox is my first ever extension, but I get the following warnings when I try to save the page (I've followed the instructions on uploading inputbox.php and edited LocalSettings.php),

Warning: Missing argument 3 for renderInputbox in /home/.../public_html/extensions/inputbox.php on line 42

Fatal error: Call to a member function getText on a non-object in /home/.../public_html/extensions/inputbox.php on line 60

Any pointers would be much appreciated

Hello, I get the exact same error and to be honest I have no idea where to look to solve it. Please help. jrleonard@gmail.com

--CMacedo 08:32, 4 March 2006 (UTC) I also get the same error message. Are you two using EasyPHP? This is the only thing I can see that may be affecting the functioning of the extension.

PHP Version: 4.3.10


 * I've got the same message too with easyphph AND on my distant website with Mw 1.5.6 (PHP: 4.4.0 (apache2handler) MySQL: 4.1.10a-log ), thanks for help. --Henrique 01:42, 3 March 2006 (UTC)

[ 3/3/2006 ] Same error here, using php on Solaris:

PHP 5.0.4 (cli) (built: Jun 28 2005 22:24:45) Copyright (c) 1997-2004 The PHP Group Zend Engine v2.0.4-dev, Copyright (c) 1998-2004 Zend Technologies


 * Getting the same error on RHEL 3, Apache 2, PHP 4.3.2. I am not using EasyPHP. --Bradley Holt 18:09, 3 March 2006 (UTC)

Same error here, PHP 5.0.5/Netware - this file needs to be rewritten to be compatible with the latest versions of PHP.
 * See http://www.gurusnetwork.com/discussion/thread/2109/ and http://www.ozoneasylum.com/5733 for some hints to fix it

Same here - I tried php 4.4.2 and 5.0.4 ... 63.229.127.222

Quick Fix
After some browsing around and quick hashing of the code I found that the following addressed the issue. However, please note that this has not yet been tested fully. Please add any issues you encounter.

Line 40: Delete variable &$parser so the function now looks like this function renderInputbox($input, $params)

Line 60: Comment out the entire line starting $boxhtml=str_replace...: # Maybe support other useful magic words here # $boxhtml=str_replace("",$parser->mTitle->getText,$boxhtml); --CMacedo 08:32, 4 March 2006 (UTC)


 * Does this disable the parser? Because that could be dangerous (allowing sql injection, html tags, etc)

Extensions don't have the power to totally disable the parser; this is just ignoring the reference to the parser passed to all parser hooks. Rob Church Talk 07:32, 9 March 2006 (UTC)

That fixes the problem. Thanks. Looks like lots of people are having this same issue, trying to perform a non-object operation on that variable.

MediaWiki 1.5: inputbox is not working
MediaWiki v1.5

I'm sure i followed the instructions, but when i added the inbox code into a page, the browser just hung up at .....wiki/index.php?title=Test&action=submit

Doesn't work with any other browser. Can someone give me a hand? I don't know whereelse to put this. Thanks.


 * First of all, upgrade from 1.5.0 to 1.5.7; your version of MediaWiki contains about four largish bugs or security issues. Next; we'll need more information in order to diagnose the problem. What you actually did; what your Apache/other HTTPD/PHP error logs state (if at all, if not, turn them on and see what comes up) etc. Rob Church Talk 07:34, 9 March 2006 (UTC)

MediaWiki 1.5.7: inputbox.php 1.20 hangs up while 1.19 works
MediaWiki 1.5.7 on Red Hat Enterprise 4 WS: With inputbox.php 1.20 version you can observe on /var/log/httpd/error_log

[client 160.xxx.yyy.zzz] PHP Warning: Missing argument 3 for renderinputbox in /var/www/html/wiki/extensions/inputbox_1.20.php on line 42

[client 160.xxx.yyy.zzz] PHP Fatal error: Call to a member function on a non-object in /var/www/html/wiki/extensions/inputbox_1.20.php on line 60

I downloaded version 1.9 from MediaWiki's SourceForge CVS and it seems to work alright.

--Canne 23:27, 4 March 2006 (UTC)

Exactly like you said. Thanks Canne! It's working now.

--Ming 23:27, 4 March 2006 (UTC)

Windows?
I have a windows installation, with IIS, which otherwise works fine. I installed Inputbox.php etc, no errors, but it just doesn't work. It seems to be running the script ok, it just doesn't render the box or translate the tags. Any ideas?


 * What version of MediaWiki? Confirm that the extension is installed; check Special:Version and see what extensions are registered. Consider adding a line like

echo( "Hook run!\n" );


 * to the parser hook function, to prove that's being executed. Rob Church Talk 07:28, 9 March 2006 (UTC)

Inputbox on the sidebar?
I just installed this extension, and it's working great.

My question is; is it possible to put a "Create Article" inputbox on the sidebar? I tried to just add one beneath the last link, but the sidebar doesn't seem to recognize it. When viewed as an article, the MediaWiki:Sidebar page displays the inputbox fine.

Is there something different I have to do, or is this just not possible. If it's not possible, is there another way to have some kind of "create article" link on the sidebar?


 * The sidebar doesn't interpret wiki text quite as you seem to expect. You could add such a box via edits to the skin file. Another semi-solution might be to set  in LocalSettings.php, which causes the user to be taken to an edit form if entering a nonexisting title and clicking Go. Rob Church (talk) 12:48, 13 June 2006 (UTC)
 * “You could add such a box via edits to the skin file”
 * can you elaborate for those who are new users...

noinclude and includeonly
I created a fairly simply set up to add creatures to a database on SporeWiki.com. The section Create a creature portal page" preloads MediaWiki:Content base/creature portal as I wanted it to, when setting it up I was really hoping that includeonly would work so that it didn't sort the mediawiki pages (since the portal template has a cat tag in it) and I found out that it does work (as you can see if you test the inputbox on the creature database page yourself). Then I wanted to be able to keep all of the messages related to adding creatures in the same place, so I figured I'd just categorize them with noinclude, but if you test out the inputbox you'll see that that portion of the code doesn't do what I thought it might... Is there any reason why that would happen, is it a mediawiki bug or an inputbox bug? Is there any temporary fix to get around it (I already set up an if template if that could be useful) for now until noinclude works in that manner? It'd be appreciated, thanks! 69.183.38.170 17:30, 7 June 2006 (UTC)


 * All I can say is "interesting problem". Apparently the includeonly tags are stripped keeping the content, but noinclude tags + content are kept as is (?). Maybe an oddity in the inputbox extension, you could report it as "bug" / missing feature / oddity at (component "extensions" "inputbox").
 * And / or try a workaround based on #ifeq: MediaWiki | {&#123;NAMESPACE&#125;}. But I've never seen a category for system messages, better test first if that's possible at all. If not you could use an ordinary template message instead of a system message for your inputbox - the help page only uses MediaWiki examples because they are guaranteed to exist and can't be vandalized. --&#160;Omniplex&#160;(w:t) 20:30, 12 June 2006 (UTC)
 * I don't know how to report bugs, and I'm not sure what you mean by a a workaround with that, but I moved it to a template and preloaded the template again and it did the same that it did earlier, loading the noinclude tag and it's text also. 69.183.39.72 05:54, 13 June 2006 (UTC)
 * I updated the page after trying it out with .--Patrick 14:10, 13 June 2006 (UTC)


 * See Bug #5210.
 * --99.236.115.46 05:20, 10 October 2007 (UTC)

using an image TEMPLATE with parameters as the 'preloaded' thing
Is it possible? All this subst and includeonly is starting to get to me, along with nested templates...

I'm trying to simplify the process of nominating an image for FPC. see here: commons:User:Pfctdayelise/test. Any tips welcome. This is a really handy extension BTW. pfctdayelise 12:11, 15 June 2006 (UTC)


 * I do not think that is possible. As a minor typing aid you can preload, that is all I can think of.--Patrick 13:04, 15 June 2006 (UTC)


 * You can also preload containing subst of . Here you fill in the image name as parameter of the latter. There is still some duplication: the Subject/headline probably has to contain the image name too, but this is not automated.


 * Patrick 13:23, 15 June 2006 (UTC)

Using inputbox to subscribe to a mailing list?
I'm looking for an extension which will allow a user to enter his/her email adress and submit the value to an external http address. I already got the HTML code for this from the mailing list service, but have trouble building it into MW properly. Could inputbox (currently or potentially) be used for this? --MortenB 21:18, 29 July 2006 (UTC)
 * make a modifies version of inputbox.php that will post the input boxes contents to the php page you wish, then have the php page do whatever with the email then redirect them wherever. ;) --71.217.192.176 00:01, 7 February 2007 (UTC)

downloading problems?
I've been trying to download the inputbox.php from the links here, but it never loads for me. Is anyone else getting this problem? Or is there a different link someone can show me to get this file?

The download is still broken! -- 193.254.183.243 08:34, 24 February 2009 (UTC)

Editintro does not work for comments
Even the example fails. pfctdayelise 15:26, 21 October 2006 (UTC)

Target =new
Is there a way to add a parameter to the inputbox so when doing page creation, the form gets posted to a new window?

This is useful for creating a page that's been populated with a list of inputboxes preloaded with titles of new pages to create.

So this way, I can go down the list and create new pages and not loose the page I'm on. You see, this is the script I'm using; so you know why this is useful for me.

This handy script will be useful for anyone who needs to create lots of these inputboxes preloaded with their topic titles so they can add a bunch of pages all at once, easily. Just edit wherever you see "TOPIC TITLE" with the respective text you need.

            "; }   else {       $namelist=explode("\n",$_POST['names']); echo " "; for($i = 0;$i < sizeof($namelist);$i++) { echo " ";

} echo "  Go to TOPICTITLE to add this code!"; } ?> Maybe somebody will have fun with this code... Anyway, I would like each inputbox thats created to open the page to be created in a new window. Is there a way to specify a target for the inputbox form? Thanks, MediaHound 15:09, 30 October 2006 (UTC)

default target
I think it would be useful to be able to specify a default page that it goes to if the user clicks the button when the text field is blank. Currently, it goes to Main_Page, but I think project:sandbox would be more useful. -Sanbeg 23:08, 2 November 2006 (UTC)

Full text search in input=search does not work
In the below box, press either button, and you get back to this page. Full text search does not work, and I don't know why. The input name is "searchx" for this button, but "fulltext" for the search button in the sidebar - which still works.

The reason for the problem is probably easy to fix.

--Barklund 19:47, 9 November 2006 (UTC)

MediaWiki 1.8.2: Unable to install
I am unable to install the extension (inputbox.php 0.1.1) as well as the hack from Algorithm. I'm pretty new to mediawiki. Any clue?

Currently using:
 * MediaWiki 1.8.2
 * PHP 5.2
 * MySQL 5.0.27

Hiding the input box, or having only the button
It would be extremely nice to be able to hide the input box somehow, and default it to a certain value in the form. The reason for this would be if I wanted to comment, and I wanted to hard code where the user could comment to. Understandably, it wouldn't be secure (javascript overwriting) but still, it would be a nice addition! -- Silivrenion Jan 1 2006
 * See below. 69.138.163.138 01:57, 5 February 2009 (UTC)

Mediawiki 1.9.0: Positioning the create box
I am using Mediawiki 1.9.0 and this wonderfull extansion. I have noticed that by default, the extansion put itself centered on a page. I found that nice for the seach function or when you put it in a tab but I wanted that the create function and box be left positioned on the page.

To acheive this, located in the code the section (At the botom): <td align="center" bgcolor="{$this->bgcolor}"> <form name="createbox" action="$action" method="get" class="createbox">

And replace by : <td align="left" bgcolor="{$this->bgcolor}"> <form name="createbox" action="$action" method="get" class="createbox"> Or replace left by whatever you want (center is the default).

--Romainp 16:47, 12 January 2007 (UTC)

MediaWiki: 1.6.8: ERROR On Line 67
it says Parse error: syntax error, unexpected T_OBJECT_OPERATOR in /home/codev/public_html/en/w/extensions/inputbox.php on line 67 please help--71.217.192.176 00:09, 4 February 2007 (UTC)


 * heres my version info:
 * MediaWiki: 1.6.8
 * PHP: 4.4.2 (cgi)
 * MySQL: 5.0.27-standard
 * --71.217.192.176 00:30, 4 February 2007 (UTC)
 * I got my host to set me up an account on their PHP5 server, and i just finished moving all the data to all my sites over and just upgraded the wiki to 1.9.2 and re-downloaded inputbox.php and all appears to be working fine now.--71.217.192.176 23:59, 6 February 2007 (UTC)

Reason for the above given error is PHP Version 4. You need V5 - then the error will not appear on line 67.


 * I fixed this error pretty easily, by unchaining the -> operators on that line, using a temp variable instead; i.e. I replaced

$boxhtml=str_replace("",$parser->getTitle->getText,$boxhtml); with: $title = $parser->getTitle; $boxhtml=str_replace("",$title->getText,$boxhtml);
 * I haven't tested thoroughly for any other PHP4 incompatibilities, but it seems to work, so it's probably worth putting that fix into SVN for those of us still running PHP4 (it's not that much uglier <tt>:)</tt>).
 * - IMSoP 17:55, 19 February 2007 (UTC)


 * I am also under PHP vers.4 and have the same syntax error, but showing on line 77. I could not find the line indicated by IMSoP to try his workaround, any idea of what might be the issue? Did the inputbox extension change since Feb. 2007?
 * 80.80.162.148 14:53, 22 February 2008 (UTC)

MediaWiki: 1.6.9: inputbox "breaking" script
I am having problems with the inputbox extension. When I add it and the entry to LocalSettings, no pages will load. I just get a blank page. I have been able to add other extensions without problems.

I am using version 1.6.9 with Linux and a MySQL backend.

Any suggestions?

Thanks


 * I'm guessing this is the PHP4 compatibility problem (see section above, including fix) - if you can find your PHP error log, it's probably logging the same parse error that others have reported, it's just suppressing it from display on your live host. - IMSoP 09:37, 20 February 2007 (UTC)

Borders
Is there any way to have a border around the input box without putting the whole thing into a table?

Defining Alignment
I have found the need to define the alignment for the inputbox on my wikipages, so i hae made a small modification that allows you to specify the alignment as a paramater, see this.--RyanB88 01:06, 14 February 2007 (UTC)

Followed all the instructions, so why is it still just code?
I followed all the instructions for installing the Inputbox and altering the ActionCreate (from Algorithm), but the page still appears as code. Did I forget something somewhere? I don't get an error; it's just that the inputboxes don't show up. --Azurite 01:59, 25 March 2007 (UTC)

dynamic default text
hi, I want to have as default text the current date, so

how to implement?

--08:25, 16 April 2007 (UTC)


 * Variables and parser functions are not supported in inputbox parameters. A cumbersome workaround is to make a big switch with for every day the full wikitext of an inputbox:


 * Patrick 10:13, 16 April 2007 (UTC)


 * Right. Thanks. So that would mean 365 different inputboxes for a year, maybe not then :/. --217.64.242.138 10:39, 16 April 2007 (UTC)

combining several small fields
I want to make a field similar to http://wikimaas.org/AddEvent. So how to connect several small boxes, to add them together to form one page title, eg. YYYY-MM-DD The launch of the new inputbox. And can I apply a maxwidth?

For filling in it is easier to type a number - - next, instead of replacing already formatted numbers in one line. Oh, and they should also have a connected tab-order :)

--217.64.242.138 10:19, 19 April 2007 (UTC)


 * MediaWiki does not allow variables in the computer programming sense, so the inputbox cannot be applied to assign a value to a variable.--Patrick 11:21, 19 April 2007 (UTC)
 * What about a sort of redirecting to a template-page which receives these different variables, and then redirects to the to-be created page? --217.64.242.138 13:42, 19 April 2007 (UTC)


 * You may be interested in Simple Forms (though I can't get it to work with MW 1.9.3) and/or Semantic Forms (but it requires the cumbersome Semantic MediaWiki). -Eep² 13:57, 3 August 2007 (UTC)

Background color?
Is there any way to to put background color on the inputbox? I'm using it on a table that has a background, and it' kind of strange to see only the inputbox with a white background. --219.121.89.169 11:27, 7 May 2007 (UTC)

Yes you can change the background color: It is a parameter that you can set, just like "type" or "buttonlabel" - you would add the phrase bgcolor= and then add a color code

see below

Looks Like This:

To figure out a color code, you just add in the hex numbers - as described here: http://html-color-codes.com/

Idea for easy extension
To make a button which runs a PHP script, eg. for sending a message using a textarea:

Add to "function render" another type "php":

elseif($this->type=='php') {return $this->runPHP ...

Add a function "runPHP" like this:

function runPHP {

$createform=<<<ENDFORM

<form name="runPHP" action="xxx.php" method="post">

''<textarea rows="3" name="textareaPHP">  <input type='submit' value="xxx" />''

 

ENDFORM;

return $createform;

}

Perhaps action="xxx.php" must be sth. like this: action="http://xxx/xxx.php", because otherwise, a new Wiki page will be opened.

Preload Upload File
I wanted to try and preload a template into the upload page, much like commons dose. I tried the commons irc and they couldn't tell me how they are doing it. So I tried at test.W with no results as you can find out yourself:

http://test.wikipedia.org/wiki/Special:Upload?action=edit&preload=Template:Dead

Any ideas? --is:Notandi:Steinninn 194.144.110.1 15:46, 20 June 2007 (UTC)


 * Adding text into Summary field on commons:Special:Upload is done with Javascript and has nothing to do with Input box. See commons:MediaWiki:Upload.js which is called from commons:MediaWiki:Common.js ∴ Alex Smotrov 15:58, 20 June 2007 (UTC)


 * I can't tough JS, every time I do I break more then I fix. Maybe you, or someone els want's to do this on en:? It has been suggested at least once. --Steinninn 16:32, 20 June 2007 (UTC)


 * I'm not sure where to start, en:MediaWiki talk:Common.js or en:Wikipedia:Village pump (proposals)‎, but in any case you need consensus first. Coding is the easy part ;) Also, I would suggest that the script doesn't insert the text automatically (like on Commons) but rather provide a link in en:MediaWiki:Fileuploadsummary that would insert it when user wants it ∴ Alex Smotrov 20:07, 20 June 2007 (UTC)


 * I made a propossal at The Village Pump. --Steinninn 00:54, 21 June 2007 (UTC)

Mediawiki 1.9.3 and 1.10: Namespace Searching not working
I have not used Inputbox before with the namespace attribute and have been unsuccessful to get it working. I have tried some of the tips posted here still with no success. I have tried using it on a couple different installs and of recent versions of Mediawiki (1.9.3 and 1.10) (PHP 5.2.2 and MySQL 5.0.24a) but with no success. It looks like it runs successfully on Wikimedia? So what am I doing wrong?! Related extensions I need to install to get it working? Ideas? Is this due to custom namespaces? Example of what I am adding:

--Myotus 13:54, 19 July 2007 (UTC)


 * I experienced the same issue and found the solution. Open inputbox.php and goto line 132

<input type='submit' name="fulltext" class="searchboxSearchButton" value="{$this->searchbuttonlabel}" />
 * and change it to

<input type='submit' name="searchx" class="searchboxSearchButton" value="{$this->searchbuttonlabel}" />


 * Works for me!
 * --Mark P. 20:22, 22 October 2007 (UTC)

--Rob Terzi 00:09, 4 March 2008 (UTC)


 * I needed this fix as well for Mediawiki 1.11, which brings up some questions:
 * Did the search interface change in some version of Mediawiki?
 * Is anyone maintaining this extension, that could make this fix permanent, or add a check for MW version?
 * Note: Search2, which doesn't seem to be documented doesn't do anything with name spaces, so that is a little trap for anyone trying to search specific name spaces.

Worked for me too, but: --Furboy 18:53, 18 April 2008 (UTC)
 * in the most current version, the suspect line is 138,
 * had to close my browser and come back for changes to work.

Multiply fields
I'd like the function to have multiple input fields on the same submit button and the content of these fields to be applied to a pre-set template. This way it becomes like a 'wizard' for creating pages that has basic set content but with only say a few parameters of the subject being different.

For example fish profiles, these pages are often 95% identical expect for the species name, common name, colour, etc.

Can this extension do this?

--Quatermass 11:59, 30 July 2007 (UTC)

Suggestions from CreateArticle
CreateArticle is based off Inputbox but my suggestions for it apply to Inputbox (and other extensions based off it, like CreateBox) as well. -Eep² 07:49, 7 August 2007 (UTC)

Transparent
Hi!, I want to know how can I configure the inputbox to match with the background color without using the parameter bgcolor, like, make it transparent. Also, I want to know if it's possible put it under the search bar in the sidebar. This is an example of what I'm talking about:

And it should look like:

Without using bgcolor

As you can see, the background color of the box (black) does not affect the input box background color and this gives me problems when I try to put it in the sidebar. Thank you very much. Thunder26 (talk) 00:59, 31 August 2007 (UTC)


 * I would try global CSS: give your table some id and then use something like . As for sidebar, do you mean editing  Mediawiki:Sidebar? I don't think it will accept inputbox. Note that if you type something in the usual search field and press Go, and the phrase is not found, then there are two links to create an article, you could make on of those links to really stand out ∴ Alex Smotrov 02:12, 1 September 2007 (UTC)


 * Thank yo very much. Thunder26 (talk) 05:17, 1 September 2007 (UTC)


 * If you add $wgGoToEdit = true; to your LocalSettings.php, typing a nonexistent article name in the search box and clicking "Go" will create that article. —Celtic Minstrel 13:38, 11 March 2008 (UTC)

please add 'summary='-Option
Hey guys, wouldn't it be usefull if you would add an option, witch sets the summary-text of the created edit. I'd need it for german WP, for example. Thanks for ths tool. Greetings, Michi —The preceding unsigned comment was added by 88.217.29.241 (talk • contribs) 14:01, 5 October 2007 (UTC). Please sign your posts!

Bug report Inputbox revision 27198
I am using PHP version 5.2.4 (cgi-fcgi) on a Windows machine. Inputbox (search) seems to be working ok, but I do see the following note in a small font at the bottom of the wiki page on which I use the Inputbox:

PHP Notice: Undefined property: Inputbox::$labeltext in C:\iWiki\extensions\Inputbox\inputbox.php on line 153

If you need more info, let me know. 80.127.78.73 01:19, 10 November 2007 (UTC)

Another namespace issue
I have tried following the above guidelines about changing line 132 but it did not work, the extension won't search in a specific namespace for me, here is an example: here Does anyone know what could be the cause? Thanks very much 60.50.173.98 00:10, 16 November 2007 (UTC)

MediaWiki 1.11.0: Create Article issue
I have recently upgraded to MediaWiki 1.11.0 and although the inputbox function still works, the button labels are labeled as &amp;lt;createarticle&amp;gt; and &amp;lt;searchfulltext&amp;gt; - where should that be fixed? --90.200.52.95 14:37, 30 December 2007 (UTC)
 * Hi. I had the same problem at http://www.appropedia.org.  I fixed it by uploading the newest code (liked on extension page) and adding the inputbox directory to the include code.  I.e. I changed   to  .  If that does not work, you could always just add the extension markup to label the buttons as you like.  Good luck, --LRG 22:05, 31 December 2007 (UTC)

Call to undefined function wfloadextensionmessages in wiki/extensions/InputBox/InputBox.classes.php on line
Installation Issue with mediawiki 1.9.3

I am trying to add this extension to MediaWiki 1.9.3 with no success.

I have downloaded inputbox.php and InputBox.i18n.php and placed them in /extensions/inputbox.

At the bottom of LocalSettings.php I have added

In MediaWiki I now receive:



I have been doing quite a bit of research on Google to find the answer myself, but it is beginning to look like I am either the only one or nobody has documented this problem before. Can someone please help? Chad.cdmtech 22:46, 7 January 2008 (UTC)


 * I still am not sure what the problem was, but I have upgraded to MediaWiki 1.11 and now all works fine. --Chad.cdmtech 17:19, 9 January 2008 (UTC)
 * Same problem, a year later:
 * MediaWiki: 1.7.1
 * PHP: 5.2.5 (cgi)
 * MySQL: 4.1.22-standard-log
 * For me the problem is on line 40. Line 40 is:


 * Line 38 is:


 * Line 58 (next section) is:


 * The entire section which is having problems is:


 * Odessaukrain 02:17, 31 December 2008 (UTC)

Extension Inputbox fault

 * MediaWiki: 1.9.3
 * PHP: 5.2.5 (cgi)
 * MySQL: 4.1.22-standard-log

I am trying to install extension:Inputbox but I am getting this error while using it: Fatal error: Call to undefined function wfloadextensionmessages in /home/gidelimm/public_html/wiki/extensions/Inputbox/inputbox.php on line 58

Is there anybody whop can help me to sort out this problem? Thanks in advance --Plenumchamber 11:27, 19 April 2008 (UTC)


 * See below for a reply. -- Sayuri 14:30, 19 January 2009 (UTC)

undefined function wfloadextensionmessages
I'm also getting the undefined function wfloadextensionmessages error.


 * MediaWiki: 1.9.3
 * PHP: 5.2.5 (cgi-fcgi)
 * MySQL: 5.0.41-log

The php error log entry: [23-Apr-2008 19:35:31] PHP Fatal error: Call to undefined function wfloadextensionmessages in .../mediawiki/extensions/inputbox/inputbox.php on line 58


 * You're trying to use too up-to-date version of InputBox with a legacy version of MediaWiki; function wfLoadExtensionMessages didn't exist prior to MW 1.11. You'll either need to upgrade your MediaWiki to a newer version, which is the preferred solution, or to use an older version of the extension. -- Sayuri 14:30, 19 January 2009 (UTC)

Version history
I suppose the latest version of extension:InputBox is not compatible with older versions of MediaWiki. It seems that only the latest version of InputBox is available on the Mediawiki SVN. For example and  refer to the SourceForce CVS, which doesn't seem to exist anymore. Is there any public repository of older versions of this extension? --Samuel —The preceding unsigned comment was added by 213.28.6.132 (talk • contribs). Please sign your posts with ~ !


 * That is exactly what svn.wikimedia.org is for. It's there so that you can download older versions of files. Extensions have been branched since MediaWiki 1.10 (REL1_10). The 1.10 branched version of Inputbox is supposed to work with MediaWiki 1.10.


 * In any case, I just can't understand why you are using old and outdated pages like Wikiquote's and test.wikipedia's pages as a reference when it comes to MediaWiki extensions. In most cases if an extension can be found at svn.wikimedia.org, its documentation can be found at MediaWiki.org &mdash; this is especially true when it comes to extensions that are used on Wikimedia sites. -- Sayuri 14:30, 19 January 2009 (UTC)

Adding NameSpace when creating articles
I'd like to combine the functionalities of search and create article... I mean there should be an input box, radiobuttons with my predefined namespaces and a button. Is there allready someone who did this? Because I tried it and for some reason it doesn't work. Can someone please help me?

Version number please
It would be helpful if the developers of this extension assigned a version number to this extension. This could be in both the code (so it shows up in special:version) and the extension infobox on this extension page. This way at a glance we can know if our MediaWiki installations are up to to date. --Maxelrod 22:04, 25 February 2008 (UTC)

Namespace Search, Hide Checkboxes Patch
I needed to search specific namespace for particular pages, so I didn't want the checkbox to show, or give the user the opportunity to uncheck the box which would cause the search to fail. Here is a patch (context diff) against Version 0.1.1 that adds a parameter namespacehide which will prevent the checkboxes from being displayed.

-- Rob Terzi 15:24, 4 March 2008 (UTC)

--- inputbox.php       2008/03/04 00:27:06 --- 103,109        getBoxOption($inputbox->buttonlabel,$input,'buttonlabel',$parser); getBoxOption($inputbox->searchbuttonlabel,$input,'searchbuttonlabel',$parser); getBoxOption($inputbox->namespaces,$input,'namespaces',$parser); +      getBoxOption($inputbox->namespacehide,$input,'namespacehide',$parser); getBoxOption($inputbox->id,$input,'id',$parser); getBoxOption($inputbox->labeltext,$input,'labeltext',$parser); getBoxOption($inputbox->br, $input, 'break',$parser); $name='Main'; }                                       if ($usernamespace == $name) { $searchform2 .= "<input type=\"checkbox\" name=\"ns{$i}\" value=\"1\"{$checked}>{$usernamespace}"; }                               }                        }                        //Line feed !                      $searchform2 .= $this->br; //If namespaces are defined remove the go button //because go button doesn't accept namespaces parameters $gobutton=''; --- 204,221                                                $name='Main'; }                                       if ($usernamespace == $name) { +                                          if (!$this->namespacehide) { $searchform2 .= "<input type=\"checkbox\" name=\"ns{$i}\" value=\"1\"{$checked}>{$usernamespace}"; +                                          } else { +                                              $searchform2 .= "<input type=\"hidden\" name=\"ns{$i}\" value=\"1\">"; +                                          }                                        }                                }                        }                        //Line feed !                      if (!$this->namespacehide) { !                        $searchform2 .= $this->br; !                      }                        //If namespaces are defined remove the go button //because go button doesn't accept namespaces parameters $gobutton='';
 * inputbox.php       2008/03/04 00:19:05     1.3
 * 103,108 ****
 * 103,108 ****
 * 203,214 ****
 * 203,214 ****


 * I don't understand how to fix it but would like to see this option to hide the checkbox(es). SO what about a Version 0.1.2? --Subfader 20:49, 16 March 2008 (UTC)

patch for current revision
Perhaps they've made a revision without changing the version number, but the code above does not match version 0.1.1 that is available currently at SVN. To make Rob Terzi's patch work with the current revision, make the following changes:

make the namespace selection work
Follow Mark P.'s patch (above) and replace <input type='submit' name="fulltext" class="searchboxSearchButton" value="{$this->searchbuttonlabel}" /> with <input type='submit' name="searchx" class="searchboxSearchButton" value="{$this->searchbuttonlabel}" />

introduce a new variable
I've called it '$showboxes' instead of 'namespacehide' because the patch hides the boxes by default and the parameter is used only to "show" the boxes. Find: class Inputbox { var $type, $width, $preload, $editintro, $br; var $defaulttext,$bgcolor,$buttonlabel,$searchbuttonlabel,$labeltext; var $hidden, $namespaces,; and replace it with class Inputbox { var $type, $width, $preload, $editintro, $br; var $defaulttext,$bgcolor,$buttonlabel,$searchbuttonlabel,$labeltext; var $hidden, $namespaces, $showboxes;

hook the new parameter
Find: $options = array(			'type' => 'type',			'width' => 'width',			'preload' => 'preload',			'editintro' => 'editintro',			'default' => 'defaulttext',			'bgcolor' => 'bgcolor',			'buttonlabel' => 'buttonlabel',			'searchbuttonlabel' => 'searchbuttonlabel',			'namespaces' => 'namespaces',			'id' => 'id',			'labeltext' => 'labeltext',			'break' => 'br',			'hidden' => 'hidden',		); and replace it with $options = array(			'type' => 'type',			'width' => 'width',			'preload' => 'preload',			'editintro' => 'editintro',			'default' => 'defaulttext',			'bgcolor' => 'bgcolor',			'buttonlabel' => 'buttonlabel',			'searchbuttonlabel' => 'searchbuttonlabel',			'namespaces' => 'namespaces',			'id' => 'id',			'labeltext' => 'labeltext',			'break' => 'br',			'hidden' => 'hidden',			'showboxes' => 'showboxes',		);

add new conditional rendering
Find: if ($usernamespace == $name) { $searchform2 .= "<input type=\"checkbox\" name=\"ns{$i}\" value=\"1\"{$checked}>{$usernamespace}"; } and replace it with if ($usernamespace == $name) { if ($this->showboxes == 'yes') { $searchform2 .= "<input type=\"checkbox\" name=\"ns{$i}\" value=\"1\"{$checked}>{$usernamespace}"; } else { $searchform2 .= "<input type=\"hidden\" name=\"ns{$i}\" value=\"1\">"; } }

And find: //Line feed $searchform2 .= $this->br; and replace it with //Line feed if ($this->showboxes == 'yes') { $searchform2 .= $this->br; }

--Furboy 20:53, 18 April 2008 (UTC)

Search this category?
Would it be possible to have the Inputbox being display as search box on all category pages so you can search the category (only consider the articles in this category)?

Had the idea when testing Extension:Multi-Category Search. This adds a special page and will search those article pages which are included in the category you've entered in the search fields. But you cannot enter normal search terms, only category names. So it would be nice to search articles in only 1 category. --Subfader 20:29, 16 March 2008 (UTC)
 * I second this. It'd be a great idea.

Default value
It would be nice if the default value in the box would disappear by clicking into it in order to type. --Subfader 20:32, 16 March 2008 (UTC)

Can you use Inputbox to use an external search engine?
I'd like to be able to use inputbox to search an external search engine. Is that possible? Would be great if that was built in. --Apolloni 09:52, 25 March 2008 (UTC)

Parsing
Has anyone looked into adding the capability to allow for parser functions inside the However, this doesn't actually search the specified namespaces.

Any help would be greatly appreciated.

-- FND 08:57, 14 July 2008 (UTC)

Invalid Parameters
Some parameters became invalid. What's wrong?--百楽兎 01:51, 26 October 2008 (UTC)

Inputbox + AJAX Search Suggestion?
Hi, I like this extension very much - one question: Is there any possibility to combine the search inputbox with the AJAX search suggestion on MediaWiki 1.13 or with the extension Search Suggest? I've already tried various things, but I haven't found a proper solution yet. I think it would be very useful... Thank you. --Filburt 07:43, 29 October 2008 (UTC)

PHP warning
With the latest svn revision of inputbox working over the latest svn revision of mediawiki 1.14alpha, I see the php warning: PHP Warning: call_user_func_array [function.call -user-func-array</a>]: Unable to call InputBoxHooks::render in includes/p arser/Parser.php on line 3330. NSK Nikolaos S. Karastathis 14:15, 4 November 2008 (UTC)

Bug with "default" parameter
Hi,

There seems to be a problem with the  parameter. Look at Extension:InputBox : below this code : ... there is no text in the inputbox : Delhovlyn 20:52, 4 November 2008 (UTC)

Fixing the broken InputBox
The current checked in version simply doesn't load as people have pointed out. This is easy to fix, and you can simplify the code. Basically get rid of the Inputbox.hooks.php.

1. In Inputbox.php replace everything from line 50 on with: 2.In Inputbox.classes.php get rid of the __construct function and replace it with: and you're done! 16:49, 6 November 2008
 * You need to be more specific is the construct function the following:


 * I get another error message:
 * Line 45 is:
 * Line 45 is:


 * Again, I am using mediawiki 1.7.1. Odessaukrain 02:55, 31 December 2008 (UTC)

In subpages
Hello, I'm a french wikibookian... I would like to know if it can be possible to search in the subpages. Thanks ! --79.87.132.217 12:26, 20 November 2008 (UTC)

Align link broken
The link to the current code in the Align section of this page is broken. 01:00, 13 December 2008


 * I changed Inputbox.classes.php to put this feature back in. I think the other align code was lost in the move.
 * Sorry I didn't do this via svn, but I don't have enough time to set svn up right now.Wezelboy 18:23, 19 December 2008

Latest Extension of InputBox doesn't work with MediaWiki 1.13.3
I've added this to my Wiki as per the install instructions and using:

I get :

Fatal error: Call to undefined method Inputbox::extractOptions in /home/mywiki/public_html/extensions/InputBox/InputBox.hooks.php on line 31

Well all 4 files are in there and I added the line in my LocalSettings.

I also see it's not available via the Snapshot link.

Does the author still support this extension?

--Stuart Halliday 16:57, 21 February 2009 (UTC)

Download link broken
I cannot download this extension. The link does not work. -- 213.39.139.251 23:09, 24 February 2009 (UTC)

Serious Bug
There is a serious bug with this extension! Whenever I use it, a bunch text fills the page. What is wrong?

68.157.59.222 02:28, 9 March 2009 (UTC)

Localize namespace names
Is it possible to localize the names in the checkboxes? 143.107.45.13 20:24, 27 June 2009 (UTC)