Content deleted Content added
No edit summary |
transwiki from meta |
||
Line 5:
Inputboxes are constructed like this:
{| border="0" cellspacing="5" cellpadding="5" frames="border" rules="all" bgcolor="#ffffff"
|-
|<pre>
<inputbox>
type=box type
Line 13 ⟶ 14:
</inputbox>
</pre>
|}
The ''type'' parameter is mandatory. All other parameters are optional.
Line 46 ⟶ 48:
| colspan="2" | Add one or more sections to an existing page, or create a page, with an edit summary that is automatically the same as the (first) new section header. The button label can be specified, see below; default [[MediaWiki:Postcomment]] also used in the sidebar of the "Standard" skin. The text field specifies which page is to be edited.
|}
{{-}}
== Parameters ==
{| border="1" cellspacing="5" cellpadding="5" frames="border" rules="all" bgcolor="#ffffff"
!Parameter<br />''Scope''
!Example
|
||'''bgcolor='''<br />''All types''<br /> <br />Sets the table background color (HTML color values). Do not use quotes.
|<pre><inputbox>
type=search
bgcolor=#eeeeff
</inputbox></pre>
<inputbox>
type=search
bgcolor=#eeeeff
</inputbox>
|
||'''width='''<br />''All types''<br /> <br />Sets the width of the inputbox in characters.
|<pre><inputbox>
type=create
width=
</inputbox></pre>
<inputbox>
type=create
width=
</inputbox>
|
||'''default='''<br />''All types''<br /> <br />Default text to put in the inputbox.
|<pre><inputbox>
type=comment
default=User talk:Eloquence
</inputbox></pre>
<inputbox>
type=comment
default=User talk:Eloquence
</inputbox>
|
||'''preload='''<br />''comment'', ''create''<br /> <br />The page under this title will be preloaded (see below) into the blank editbox when a new page is created.
|<pre><inputbox>
type=create
preload=MediaWiki:Editthispage
</inputbox></pre>
<inputbox>
type=create
preload=MediaWiki:Editthispage
</inputbox>
|
|colspan="2"|Enter the title of a non-existent page in the example inputbox above or below, and click "Create article" or "Post a comment" respectively to test this effect.
|-
||'''editintro='''<br />''comment'', ''create''<br /> <br />The text of the page under this title will be added, as instructions, ''before'' the submission form for '''new''' pages.
|<pre><inputbox>
type=comment
editintro=MediaWiki:Missingcommenttext
</inputbox></pre>
<inputbox>
type=comment
editintro=Mediawiki:Missingcommenttext
</inputbox>
|
||'''
|<pre><inputbox>
type=comment
buttonlabel=Add new rumor
</inputbox></pre>
<inputbox>
type=comment
buttonlabel=Add new rumor
</inputbox>
|
||'''
|<pre><inputbox>
type=search
searchbuttonlabel=Dig deeper
</inputbox></pre>
<inputbox>
type=search
searchbuttonlabel=Dig deeper
</inputbox>
|
||'''break='''<br />''All types''<br /> <br />Whether or not to insert a line break between the input box and the button(s). Defaults to using the line break unless set to '''no'''.
|<pre><inputbox>
type=create
width=24
break=no
</inputbox></pre>
<inputbox>
type=create
width=24
break=no
</inputbox>
Line 209 ⟶ 148:
Unfortunately <tt>preload</tt> does not yet work for the [[Special:Upload]] summary.
Please note that variables and templates are not supported in inputbox parameters.
==Preload==
Preloading can be done with an inputbox (see above), but also with a URL like
{{fullurl:m:abc|action=edit&preload=Template:Preload_demo}} which links to the edit box of a new page, preloaded with {{tim|Preload demo}}.
The wikitext of the preloaded page, including noinclude parts and tags but excluding includeonly tags, is loaded into the editbox if the target page does not exist yet. If the target of the preload operation already exists then only its wikitext is loaded, the preload command is ignored.
The fact that the includeonly tags are not included can be utilized by putting "subst:" inside them, to define a noinclude part (without using noinclude tags):
<nowiki>{{<includeonly>subst:</includeonly>#ifeq: {{<includeonly>subst:</includeonly>FULLPAGENAME}}| name of preloaded page| noinclude part| includeonly part}}</nowiki>
==Installation==
#Download and save the file [http://svn.wikimedia.org/
#Open and edit the [[LocalSettings.php]] file by adding the following line near the bottom:
<pre>require_once("extensions/inputbox.php");</pre>
NOTE: Make sure that it is still above the closing php tag so that it looks like this:<pre>require_once("extensions/inputbox.php");
?></pre>
#May need to add the following [[User:Algorithm/actionCreate]]
<!-- I make the installation more specific because adding the require_once at the top of the LocalSettings.php file (still under the opening "<?php" tag didn't work for me. Putting the line near the bottom of the file did.-->
{{h:f|langs=|enname=Inputbox}}
[[Category:MediaWiki extensions|Inputbox]]
|