Difference between revisions of "Help:Inputbox"

From Moped Wiki
Jump to: navigation, search
m (yay template)
(this doesn't work, but since I'm not an admin I can't delete it...so I changed it to this)
Line 1: Line 1:
{{TOCright}}
+
Whoops! Input boxes don't work on Moped Wiki quite yetIn the meantime, peruse these other fine help pages:
Using the Inputbox extension puts an input box on any page upon which it is used.  See below for usage.  This extension is fairly awkward, and should probably not be used much.
 
 
 
==General Syntax==
 
Inputboxes are constructed like this:
 
{| border="0" cellspacing="5" cellpadding="5" frames="border" rules="all" bgcolor="#ffffff"
 
|-
 
|<pre>
 
<inputbox>
 
type=box type
 
parameter1=value
 
parameter2=value
 
  </inputbox>
 
</pre>
 
|}
 
 
 
The ''type'' parameter is mandatory. All other parameters are optional.
 
 
 
==Box Types==
 
{| border="1" cellspacing="5" cellpadding="5" bgcolor="white" width="79%"
 
!Type
 
!Example
 
|-
 
! type=search
 
|
 
<inputbox>
 
type=search
 
</inputbox>
 
|-
 
| colspan="2" | Generates a search box with a default width of 50 characters. The button labels can be specified, see below; defaults [[MediaWiki:Tryexact]] and [[MediaWiki:Searchfulltext]]. The text field specifies the search criteria.
 
|-
 
! type=create
 
|
 
<inputbox>
 
type=create
 
</inputbox>
 
|-
 
| colspan="2" | Allows creating a new page. The button label can be specified, see below; default [[MediaWiki:Createarticle]]. The text field specifies which page is to be edited.
 
|-
 
! type=comment
 
|
 
<inputbox>
 
type=comment
 
</inputbox>
 
|-
 
| 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" skinThe 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 />&#160;<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 />&#160;<br />Sets the width of the inputbox in characters.
 
|<pre><inputbox>
 
type=create
 
width=24
 
</inputbox></pre>
 
<inputbox>
 
type=create
 
width=24
 
</inputbox>
 
|-
 
||'''default='''<br />''All types''<br />&#160;<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 />&#160;<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 />&#160;<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>
 
|-
 
||'''buttonlabel='''<br />''All types''<br />&#160;<br />This label will be used for the main button of the form.
 
|<pre><inputbox>
 
type=comment
 
buttonlabel=Add new rumor
 
</inputbox></pre>
 
<inputbox>
 
type=comment
 
buttonlabel=Add new rumor
 
</inputbox>
 
|-
 
||'''searchbuttonlabel='''<br />''search''<br />&#160;<br />This label will be used for the "Search full text" button of the search form.
 
|<pre><inputbox>
 
type=search
 
searchbuttonlabel=Dig deeper
 
</inputbox></pre>
 
<inputbox>
 
type=search
 
searchbuttonlabel=Dig deeper
 
</inputbox>
 
|-
 
||'''break='''<br />''All types''<br />&#160;<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>
 
|}
 
 
 
Applying ''create ''&#160;to an existing page simply gives the edit page. In that case <tt>editintro</tt> and <tt>preload</tt> are ignored.
 
Applying ''comment ''&#160;for a new page works, if the page already exists <tt>editintro</tt> is ignored.
 
 
 
The texts taken from the <tt>MediaWiki:</tt> namespace are of course only examples, any existing page can be used for <tt>editintro</tt> or <tt>preload</tt>.
 
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.
 
 
 
 
{{Help}}
 
{{Help}}
 
[[Category:Help|Inputbox]]
 
[[Category:Help|Inputbox]]

Revision as of 12:53, 16 August 2008

Whoops! Input boxes don't work on Moped Wiki quite yet. In the meantime, peruse these other fine help pages:

MopedWiki Help Pages
IntroductionSearchingBasic EditingEditing (longer)LinksCategories
ImagesTablesTemplatesUserboxesRevertingStubsRainy Day Edits