Belzebute-Box-Generateurs

De Didaquest
Aller à la navigationAller à la recherche

Créer une page Standard avec l'extension: createbox

<createbox>

 parameter1=value
 parameter2=value
</createbox>

CreateBox handles parameters in the same manner as Inputbox. Example:

 <createbox>
  parameter1=value
  parameter2=value
 </createbox>

All parameters to CreateBox are optional.

  • align: Sets the alignment of the div which contains CreateBox. Defaults to center.
  • break: If set to "yes", this inserts a line break between the text field and button.
  • buttonlabel: Sets the text of the Create button.
  • default: Sets the default text of the input box.
  • editintro: Specifies a page title. The given page will be included prior to the submission form in the Edit screen.
  • prefix: Specifies a title fragment, which will prefix the submitted title.
  • preload: Specifies a page title. The contents of the given page will be preloaded into the submission form.
  • width: Sets the width of the input box.


Créer une page de webquest avec l'extension: createbox

divers autres scripts et modèles adaptés et configuré on été par Abrougui Mondher

  • Permet de Mettre le titre de votre futur Webquest

<createbox>

 align=left
 break=yes
 buttonlabel= Inserrer le titre de votre Webquest et Creer le en cliquant ICI 
 default=Ecrire ici le Titre de votre Webquest
 prefix=Webquest:  
 width=80

editintro= Templates de webquests </createbox>

  • editintro: Specifies a page title. The given page will be included prior to the submission form in the Edit screen.
  • preload: Specifies a page title. The contents of the given page will be preloaded into the submission form.

exemple de boites avec l'extension InputBox

Modèle:Extension

The InputBox extension is a MediaWiki extension by Erik Möller to add predefined HTML forms to wiki pages. It was originally created for the purpose of adding a Create an article box to Wikinews. It requires at least MediaWiki 1.5 and an extensions script (see #Installation above).

Installation

  1. Download and save the files InputBox.php and InputBox.i18n.php and [1] and [2] to the extensions/InputBox/ folder of your MediaWiki installation. The most recent version of InputBox.php may not work on older MediaWiki installations. Version 1.17 works for MediaWiki 1.6.8.

    You can as well check out from the subversion repository directly to the $IP/extensions/ folder, if you so wish:
    svn co http://svn.wikimedia.org/svnroot/mediawiki/trunk/extensions/InputBox/
  2. Open and edit the LocalSettings.php file by adding the following line near the bottom:
    require_once($IP.'/extensions/InputBox/InputBox.php');

Example

Wiki code

<inputbox>
type=search
width=42
buttonlabel=Go
searchbuttonlabel=Search
break=no
</inputbox>

Result

This kind was found on the main page of a Wikipedia. It could be used for starting new articles, since it doesn’t go to the edit box of articles that already exist.

General syntax

InputBoxes are constructed like this:

 <inputbox>
 type=
 bgcolor=
 width=
 default=
 preload=
 editintro=
 buttonlabel=
 hidden=
 searchbuttonlabel=
 break=
 namespaces=
 </inputbox>

The type parameter is mandatory. All other parameters are optional.

Box types

Type Example
type=search
Generates a search box with a default width of 50 characters. The text field specifies the search criteria. Default button labels are MediaWiki:Tryexact and MediaWiki:Searchfulltext.
type=create

Allows creating a new page. The text field specifies which page is to be edited. Default button label is MediaWiki:Createarticle.
type=comment

Adds a new section to the bottom of the page specified in the text field. Default button label is MediaWiki:Postcomment also used in the sidebar of the "Standard" skin.
type=commenttitle

Adds a new section with the section header specified in the text field. The page has to be specified with page= parameter. Default button label is MediaWiki:Postcomment. This type was added in rev:42703.

Parameters

Parameter
Scope
Example
bgcolor=
All types
 
Sets the table background color (HTML color values). Do not use quotes.
<inputbox>
type=search
bgcolor=#eeeeff
</inputbox>
width=
All types
 
Sets the width of the InputBox in characters.
<inputbox>
type=create
width=24
</inputbox>

default=
All types
 
Default text to put in the InputBox.
<inputbox>
type=comment
default=User talk:Eloquence
</inputbox>

preload=
comment, create
 
The page under this title will be preloaded (see Manual:Creating pages with preloaded text) into the blank editbox when a new page is created.
<inputbox>
type=create
preload=Log
</inputbox>

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=
comment, create
 
The text of the page under this title will be added, as instructions, before the editing window.
<inputbox>
type=comment
editintro=MediaWiki:Missingcommenttext
</inputbox>

buttonlabel=
All types
 
This label will be used for the main button of the form.
<inputbox>
type=comment
buttonlabel=Add new rumor
</inputbox>

hidden=
create, comment
 
This specifies that there is no inputbox.
It is used with parameter "default", now not being a default, but the fixed value of the name of the page.
<inputbox>
type=comment
editintro=Extension:InputBox/editintro comment
preload=Extension:InputBox/preload
hidden=yes
default=Extension talk:Inputbox
buttonlabel=Post a comment on the talk page
</inputbox>

searchbuttonlabel=
search
 
This label will be used for the "Search full text" button of the search form.
<inputbox>
type=search
searchbuttonlabel=Dig deeper
</inputbox>
break=
All types
 
Whether or not to insert a line break between the input box and the button(s). Defaults to yes (use a line break).
<inputbox>
type=create
width=24
break=no
</inputbox>
namespaces=
search
 
Support for namespace checkboxes in fulltext search.
With "Namespace**" it is checked by default.
<inputbox>
type=search
namespaces=Main**,Help
</inputbox>

Applying create  to an existing page simply gives the edit page. In that case preload is ignored. Applying comment  for a new page works.

The texts taken from the MediaWiki: namespace are of course only examples, any existing page can be used for editintro or preload. Unfortunately preload does not yet work for the Special:Upload summary.

Please note that variables, templates, parser functions and template parameters are not supported in InputBox parameters.

Alignment enhancement

I found that there was a need to define alignment each time I use an input box. I could have just removed the div tag from the input box HTML and specified the div when posting the InputBox. Instead I added a parameter that allows you to define the align in the code.

To use this, get an updated copy of the code here then you can specify align=left, align=center, or align=right with the other parameters.

I hope you find it useful.

Known bugs

  • bugzilla:5210 – <noinclude> and <includeonly> tags are not respected from a preloaded template.
  • bugzilla:5216 – Use more flexible CSS instead of bgcolor attribute for InputBox bgcolor option.
  • bugzilla:13262 – New Talk Page Option.
  • bugzilla:11777 – Multiple InputBoxes make page invalid due to repetitive similar id
  • bugzilla:6640 – Prefix option for InputBox.
  • bugzilla:5067 – InputBox background should be transparent by default
  • bugzilla:5552 – add a fulltext-only search mode to InputBox
  • bugzilla:13909 – Trying to 'indent' an input box breaks the formatting on the rest of the page.
  • bugzilla:13834 – Too much formatting!

See also

Modèle:OnWikimedia

Modèle:Languages