Community Central
Community Central
m (Uncommented section that works (after no replies on Thread:1272721) Added commenttitle example, removed the part about MediaWiki message)
Tags: Help rollback sourceedit
mNo edit summary
Tag: Help
(32 intermediate revisions by 19 users not shown)
Line 1: Line 1:
{{enabled by default}}
+
{{Enabled by default}}
  +
 
{{tocright}}
 
{{tocright}}
 
 
An '''inputbox''' allows you to put a box on any page, which has a text field for users to fill and a customizable button for launching the action.
 
An '''inputbox''' allows you to put a box on any page, which has a text field for users to fill and a customizable button for launching the action.
   
 
There are three types: the '''article creation box''', the '''search box''', and the '''comment box'''. The default width for all boxes is 50 characters.
 
There are three types: the '''article creation box''', the '''search box''', and the '''comment box'''. The default width for all boxes is 50 characters.
   
  +
== Box types ==
== How do I add an article creation box to a page? ==
 
 
=== Article creation box ===
An article creation box places a box on the page that lets the user create a new page by entering the page title. A new page will be opened at the title the user types in. Page creation is handled by the InputBox extension, or by the CreateBox extension. CreateBox takes mostly the same arguments as InputBox when used with <code>type=create</code>. Both check if a page already exists and display an error message if it does.
+
An article creation box places a box on the page that lets the user create a new page by entering the page title. A new page will be opened at the title the user types in. Page creation is handled by the InputBox [[Help:Extensions|extension]]. It checks if a page already exists and display an error message if it does. It is also possible to [[#Using preloaded templates with an article creation box|use preloaded templates with the box]] to simplify the article creation process for editors.
   
 
{| class="article-table"
To change the text on all Create buttons on your site, edit the [[Help:MediaWiki namespace|MediaWiki message]] "[[MediaWiki:Create]]" on your community.
 
 
{| class="wikitable"
 
 
|- style="vertical-align:top;"
 
|- style="vertical-align:top;"
 
!Type this:
 
!Type this:
 
!To make this:
 
!To make this:
 
|- style="vertical-align:top;"
 
|- style="vertical-align:top;"
 
|<pre style="border: none; background: transparent; padding: 2px 5px">
|
 
<pre style="border: none; background: transparent; padding: 2px 5px">
 
 
<inputbox>
 
<inputbox>
 
type=create
 
type=create
 
</inputbox>
 
</inputbox>
 
</pre>
 
</pre>
 
|<inputbox>
|
 
<inputbox>
 
 
type=create
 
type=create
 
</inputbox>
 
</inputbox>
 
|}
 
|}
   
== How do I add a search box to a page? ==
+
=== Search box ===
 
A search box provides an extra box for users to search your community, in addition to the one in the global navigation bar.
 
A search box provides an extra box for users to search your community, in addition to the one in the global navigation bar.
   
 
{| class="article-table"
To change the text on all Search buttons on your site, edit the [[Help:MediaWiki namespace|MediaWiki messages]] "[[MediaWiki:Tryexact]]" and "[[MediaWiki:Searchfulltext]]" on your community.
 
 
{| class="wikitable"
 
 
|- style="vertical-align:top;"
 
|- style="vertical-align:top;"
 
!Type this:
 
!Type this:
 
!To make this:
 
!To make this:
 
|- style="vertical-align:top;"
 
|- style="vertical-align:top;"
 
|<pre style="border: none; background: transparent; padding: 2px 5px">
|
 
<pre style="border: none; background: transparent; padding: 2px 5px">
 
 
<inputbox>
 
<inputbox>
 
type=search
 
type=search
 
</inputbox>
 
</inputbox>
 
</pre>
 
</pre>
 
|<inputbox>
|
 
<inputbox>
 
 
type=search
 
type=search
 
</inputbox>
 
</inputbox>
 
|}
 
|}
   
== How do I add a comment box to a page? ==
+
=== Comment box ===
This box adds a section to an existing page -- this can be helpful in adding a new discussion to a talk page, or new items to a news page.
+
This box adds a section to an existing page (not necessarily the page used in.), which can be helpful in adding a new discussion to a talk page, or new items to a news page.
   
 
The text typed in the box is the page where to start a new section header. If you use as type ''commenttitle'' instead of ''comment'', the text typed in the box becomes the new section header, and is also used as the [[Help:Edit summary|edit summary]] for the addition. In this case, you additionally need to define a pagename with the ''page'' parameter.
 
The text typed in the box is the page where to start a new section header. If you use as type ''commenttitle'' instead of ''comment'', the text typed in the box becomes the new section header, and is also used as the [[Help:Edit summary|edit summary]] for the addition. In this case, you additionally need to define a pagename with the ''page'' parameter.
   
{| class="wikitable"
+
{| class="article-table"
 
|- style="vertical-align:top;"
 
|- style="vertical-align:top;"
 
! Type this:
 
! Type this:
 
! To make this:
 
! To make this:
 
|- style="vertical-align:top;"
 
|- style="vertical-align:top;"
 
|<pre style="border: none; background: transparent; padding: 2px 5px">
|
 
<pre style="border: none; background: transparent; padding: 2px 5px">
 
 
<inputbox>
 
<inputbox>
 
type = comment
 
type = comment
 
buttonlabel=Post a comment
 
</inputbox>
 
</inputbox>
 
</pre>
 
</pre>
 
|<inputbox>
|
 
<inputbox>
 
 
type = comment
 
type = comment
  +
buttonlabel=Post a comment
 
</inputbox>
 
</inputbox>
 
|-
 
|-
Line 75: Line 68:
 
type = commenttitle
 
type = commenttitle
 
page = Help talk:Inputbox
 
page = Help talk:Inputbox
  +
buttonlabel=Post a comment
 
</inputbox>
 
</inputbox>
 
</pre>
 
</pre>
 
|<inputbox>
|
 
<inputbox>
 
 
type = commenttitle
 
type = commenttitle
 
page = Help talk:Inputbox
 
page = Help talk:Inputbox
  +
buttonlabel=Post a comment
 
</inputbox>
 
</inputbox>
 
|}
 
|}
   
== How can I customize the inputboxes? ==
+
== Customizing inputboxes ==
 
There are several parameters you can use to customize the display of the inputboxes.
 
There are several parameters you can use to customize the display of the inputboxes.
   
; Background color:
+
; Background color
  +
:
:<tt>bgcolor=#FFFFFF</tt>
+
:<code>bgcolor=#FFFFFF</code>
:Sets the background color using [[Help:Color|HTML color values]]. Do not use quotes. Make this the same as the page color (as specified in the [[help:skins|skin]]) to make the background disappear.
 
  +
:Sets the background color using [[Help:Color|HTML color values]]. Enter the color value without using quotes. Note that setting a background color that is very light or dark can make the inputbox unreadable on [[Help:Theme Designer|dark or light themes]], and should be avoided.
   
; Width:
+
; Width
  +
:
:<tt>width=##</tt>
+
:<code>width=##</code>
 
:Sets width of input field, where ## is a number of characters. (The default is 50.)
 
:Sets width of input field, where ## is a number of characters. (The default is 50.)
   
; Default text:
+
; Default text
  +
:
:<tt>default=any text</tt>
+
:<code>default=any text</code>
:Default text to put in the inputbox, such as "enter page title here"
+
:Default text to put in the inputbox before it is changed, such as "enter page title here".
   
; Button label:
+
; Button label
  +
:
:<tt>buttonlabel=any text</tt>
 
 
:<code>buttonlabel=any text</code>
:This label will be used for the main button of the form.
+
:This label will be used for the text in the main submit button of the form.
   
; Search button label:
+
; Search button label
  +
:
:<tt>searchbuttonlabel=any text</tt>
+
:<code>searchbuttonlabel=any text</code>
:This label will be used for the "Search full text" button of the search form.
+
:For search forms, this label will be used for the "Search full text" button.
   
; Line break:
+
; Line break
  +
:
:<tt>break=no</tt>
+
:<code>break=no</code>
 
:Removes the default line break between the input box and the button(s), displaying them side by side.
 
:Removes the default line break between the input box and the button(s), displaying them side by side.
   
; Placeholder:
+
; Placeholder
  +
:
:<tt>placeholder=any text</tt>
 
  +
:<code>placeholder=any text</code>
 
:Define placeholder text that will display in the input box when it is empty.
 
:Define placeholder text that will display in the input box when it is empty.
   
; Hide Box:
+
; Hide Box
  +
:
:<tt>hidden=yes</tt>
+
:<code>hidden=yes</code>
 
:Removes the box and automatically goes to the page specified by <code>default=</code>.
 
:Removes the box and automatically goes to the page specified by <code>default=</code>.
   
{| class="wikitable"
+
{| class="article-table"
 
|- style="vertical-align:top;"
 
|- style="vertical-align:top;"
 
!Type this:
 
!Type this:
 
!To make this:
 
!To make this:
 
|-
 
|-
 
|<pre style="border: none; background: transparent; padding: 2px 5px">
|
 
<pre style="border: none; background: transparent; padding: 2px 5px">
 
 
<inputbox>
 
<inputbox>
 
type=create
 
type=create
Line 134: Line 135:
 
</inputbox>
 
</inputbox>
 
</pre>
 
</pre>
 
|<inputbox>
|
 
<inputbox>
 
 
type=create
 
type=create
 
width=15
 
width=15
Line 144: Line 144:
 
|}
 
|}
   
{| class="wikitable"
+
{| class="article-table"
 
|- style="vertical-align:top;"
 
|- style="vertical-align:top;"
 
!Type this:
 
!Type this:
 
!To make this:
 
!To make this:
 
|-
 
|-
 
|<pre style="border: none; background: transparent; padding: 2px 5px">
|
 
<pre style="border: none; background: transparent; padding: 2px 5px">
 
 
<inputbox>
 
<inputbox>
 
type=create
 
type=create
Line 160: Line 159:
 
</inputbox>
 
</inputbox>
 
</pre>
 
</pre>
 
|<inputbox>
|
 
<inputbox>
 
 
type=create
 
type=create
 
width=15
 
width=15
Line 174: Line 172:
 
: ''See [[Help:Preloaded templates]] for more detail''
 
: ''See [[Help:Preloaded templates]] for more detail''
   
If you want to use a standard article template, you can specify this in the form.
+
If you want to use a standard article template, you can specify this in the form. Doing so will pre-load an article with a basic layout in terms of templates and structure, making the process standard for editors.
 
'''Preloaded text:''' <tt>preload=pagename</tt>
 
For comment and create boxes, the text of the page under pagename will be preloaded (see below) into the blank editbox when a new page is created.
 
   
  +
;Preloaded text
 
:<code>preload=pagename</code>
 
:For comment and create boxes, the text of the page under pagename will be preloaded (see below) into the blank editbox when a new page is created.
 
:Example: By specifying "preload=Template:New_page", the content of "Template:New page" will be loaded into the edit box for the new article.
 
:Example: By specifying "preload=Template:New_page", the content of "Template:New page" will be loaded into the edit box for the new article.
   
'''Edit introduction:''' <tt>editintro=pagename</tt>
+
;Edit introduction
  +
:<code>editintro=pagename</code>
For comment and create boxes, the text of the page under pagename will be added, as instructions, before the submission form for new pages. It is displayed instead of the text of [[MediaWiki:Newarticletext]]
+
:For comment and create boxes, the text of the page under pagename will be added, as instructions, before the submission form for new pages. It is displayed instead of the text of [[MediaWiki:Newarticletext]].
 
 
:Example: By specifying "editintro=Template:Welcome", the content of Template:Welcome will be shown above the article.
 
:Example: By specifying "editintro=Template:Welcome", the content of Template:Welcome will be shown above the article.
   
{| class="wikitable"
+
{| class="article-table"
 
|- style="vertical-align:top;"
 
|- style="vertical-align:top;"
 
!Type this:
 
!Type this:
 
!To make this:
 
!To make this:
 
|-
 
|-
 
|<pre style="border: none; background: transparent; padding: 2px 5px">
|
 
  +
<inputbox>
<pre style="border: none; background: transparent; padding: 2px 5px">
 
  +
type=create
<createbox>
 
 
preload=Template:New_page
 
preload=Template:New_page
 
editintro=Template:Welcome
 
editintro=Template:Welcome
 
width=25
 
width=25
</createbox>
+
</inputbox>
 
</pre>
 
</pre>
  +
|<inputbox>
|
 
  +
type=create
<createbox>
 
 
preload=Template:New_page
 
preload=Template:New_page
 
editintro=Template:Welcome
 
editintro=Template:Welcome
 
width=25
 
width=25
</createbox>
+
</inputbox>
 
|}
 
|}
 
== Article creation links ==
 
You can also create links that make use of the inputbox feature without inserting the box itself onto a page.
 
 
For example, http://community.wikia.com/index.php?title=Test_Page&preload=Help:Inputbox&action=edit will open a new page at "Test Page" and preload it with the text from the "Help:Inputbox" page.
 
 
You can also open a new page for editing with a custom message at the top. For example, http://community.wikia.com/index.php?title=Test_Page&editintro=Template:Beta&action=edit will load a blank page, with the "Template:Beta" content displayed above the editing box.
 
 
You can combine these two, to give a page that opens with the "Template:Beta" message at the top, and the content of "Help:Inputbox" loaded into the edit box. http://community.wikia.com/index.php?title=Test_Page&preload=Help:Inputbox&action=edit&editintro=Template:Beta
 
 
See [[Help:Preloaded templates]] for more information.
 
   
 
== See also ==
 
== See also ==
 
* [[mw:Extension:Inputbox|Inputbox extension documentation on MediaWiki.org]]
 
* [[mw:Extension:Inputbox|Inputbox extension documentation on MediaWiki.org]]
* [[mw:Extension:CreateBox|CreateBox extension documentation on MediaWiki.org]]
 
   
 
== Further help and feedback ==
 
== Further help and feedback ==
 
{{Help and feedback section}}
 
{{Help and feedback section}}
  +
[[be:Help:Inputbox]]
 
 
[[de:Hilfe:Inputbox]]
 
[[de:Hilfe:Inputbox]]
 
[[es:Ayuda:Inputbox]]
 
[[es:Ayuda:Inputbox]]
Line 234: Line 220:
 
[[pt:Ajuda:Inputbox]]
 
[[pt:Ajuda:Inputbox]]
 
[[ru:Справка:Inputbox]]
 
[[ru:Справка:Inputbox]]
  +
[[tr:Yardım:Giriş kutusu]]
 
[[uk:Довідка:Inputbox]]
 
[[uk:Довідка:Inputbox]]
 
[[zh:Help:輸入框]]
 
[[zh:Help:輸入框]]
  +
 
[[Category:Help]]
 
[[Category:Help]]
  +
[[Category:Extensions]]

Revision as of 09:45, 15 September 2021

This extension is enabled by default on Fandom.

An inputbox allows you to put a box on any page, which has a text field for users to fill and a customizable button for launching the action.

There are three types: the article creation box, the search box, and the comment box. The default width for all boxes is 50 characters.

Box types

Article creation box

An article creation box places a box on the page that lets the user create a new page by entering the page title. A new page will be opened at the title the user types in. Page creation is handled by the InputBox extension. It checks if a page already exists and display an error message if it does. It is also possible to use preloaded templates with the box to simplify the article creation process for editors.

Type this: To make this:
<inputbox>
type=create
</inputbox>

Search box

A search box provides an extra box for users to search your community, in addition to the one in the global navigation bar.

Type this: To make this:
<inputbox>
type=search
</inputbox>

Comment box

This box adds a section to an existing page (not necessarily the page used in.), which can be helpful in adding a new discussion to a talk page, or new items to a news page.

The text typed in the box is the page where to start a new section header. If you use as type commenttitle instead of comment, the text typed in the box becomes the new section header, and is also used as the edit summary for the addition. In this case, you additionally need to define a pagename with the page parameter.

Type this: To make this:
<inputbox>
type = comment
buttonlabel=Post a comment
</inputbox>

<inputbox>
type = commenttitle
page = Help talk:Inputbox
buttonlabel=Post a comment
</inputbox>

Customizing inputboxes

There are several parameters you can use to customize the display of the inputboxes.

Background color
bgcolor=#FFFFFF
Sets the background color using HTML color values. Enter the color value without using quotes. Note that setting a background color that is very light or dark can make the inputbox unreadable on dark or light themes, and should be avoided.
Width
width=##
Sets width of input field, where ## is a number of characters. (The default is 50.)
Default text
default=any text
Default text to put in the inputbox before it is changed, such as "enter page title here".
Button label
buttonlabel=any text
This label will be used for the text in the main submit button of the form.
Search button label
searchbuttonlabel=any text
For search forms, this label will be used for the "Search full text" button.
Line break
break=no
Removes the default line break between the input box and the button(s), displaying them side by side.
Placeholder
placeholder=any text
Define placeholder text that will display in the input box when it is empty.
Hide Box
hidden=yes
Removes the box and automatically goes to the page specified by default=.
Type this: To make this:
<inputbox>
type=create
width=15
placeholder=Type here!
buttonlabel=Click here!
break=no
</inputbox>
Type this: To make this:
<inputbox>
type=create
width=15
default=Type here!
hidden=yes
buttonlabel=Click here!
break=no
</inputbox>

Using preloaded templates with an article creation box

See Help:Preloaded templates for more detail

If you want to use a standard article template, you can specify this in the form. Doing so will pre-load an article with a basic layout in terms of templates and structure, making the process standard for editors.

Preloaded text
preload=pagename
For comment and create boxes, the text of the page under pagename will be preloaded (see below) into the blank editbox when a new page is created.
Example: By specifying "preload=Template:New_page", the content of "Template:New page" will be loaded into the edit box for the new article.
Edit introduction
editintro=pagename
For comment and create boxes, the text of the page under pagename will be added, as instructions, before the submission form for new pages. It is displayed instead of the text of MediaWiki:Newarticletext.
Example: By specifying "editintro=Template:Welcome", the content of Template:Welcome will be shown above the article.
Type this: To make this:
<inputbox>
type=create
preload=Template:New_page
editintro=Template:Welcome
width=25
</inputbox>

See also

Further help and feedback