Jump to content
Toggle menu
  • 8 articles
  • 75 files
  • 7 users
  • 37.8K edits
Neodyland Wiki
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Template:Mbox/doc: Difference between revisions

Template page
remove duplicate parameters, test
Examples: +1 message (to complete the list)
Line 2: Line 2:
  |1        = text
  |1        = text
  |1d-en    = The text to be displayed.
  |1d-en    = The text to be displayed.
  |1label  = <!-- A (very) brief name for the parameter. -->
  |1label  = <!-- A (very) brief name for the parameter. -->
  |1aliases = <!-- List of aliases, separated by / (a slash) -->
  |1aliases = <!-- List of aliases, separated by / (a slash) -->
  |1type    = string/line
  |1type    = string/line
Line 10: Line 10:
  |2        = type
  |2        = type
  |2d-en    = Changes the color depending on the message needed. Each has its own preset image.
  |2d-en    = Changes the color depending on the message needed. Each has its own preset image.
  |2label  = <!-- A (very) brief name for the parameter. -->
  |2label  = <!-- A (very) brief name for the parameter. -->
  |2aliases = <!-- List of aliases, separated by / (a slash) -->
  |2aliases = <!-- List of aliases, separated by / (a slash) -->
  |2type    = string
  |2type    = string
Line 18: Line 18:
  |3        = image
  |3        = image
  |3d-en    = Override the image ("none" for no image).
  |3d-en    = Override the image ("none" for no image).
  |3label  = <!-- A (very) brief name for the parameter. -->
  |3label  = <!-- A (very) brief name for the parameter. -->
  |3aliases = <!-- List of aliases, separated by / (a slash) -->
  |3aliases = <!-- List of aliases, separated by / (a slash) -->
  |3type    = string/wiki-page-name
  |3type    = string/wiki-page-name
Line 26: Line 26:
  |4        = imageright
  |4        = imageright
  |4d-en    = Show an image on the right side.
  |4d-en    = Show an image on the right side.
  |4label  = <!-- A (very) brief name for the parameter. -->
  |4label  = <!-- A (very) brief name for the parameter. -->
  |4aliases = <!-- List of aliases, separated by / (a slash) -->
  |4aliases = <!-- List of aliases, separated by / (a slash) -->
  |4type    = string/wiki-page-name
  |4type    = string/wiki-page-name
  |4def    = <!-- default value for the parameter -->
  |4def    = <!-- default value for the parameter -->
  |4stat    = <!-- required, optional or optional-; optional- means it is optional and omitted in the usage-sample -->
  |4stat    = <!-- required, optional or optional-; optional- means it is optional and omitted in the usage-sample -->
  -  
  -
  |5        = textstyle
  |5        = textstyle
  |5d-en    = Override default style of text (e.g. centering - "align:left" / "align:right" / "align:center").
  |5d-en    = Override default style of text (e.g. centering - "align:left" / "align:right" / "align:center").
  |5label  = <!-- A (very) brief name for the parameter. -->
  |5label  = <!-- A (very) brief name for the parameter. -->
  |5aliases = <!-- List of aliases, separated by / (a slash) -->
  |5aliases = <!-- List of aliases, separated by / (a slash) -->
  |5type    = string
  |5type    = string
Line 42: Line 42:
  |6        = style
  |6        = style
  |6d-en    = Override in custom style overrides for the template using CSS.
  |6d-en    = Override in custom style overrides for the template using CSS.
  |6label  = <!-- A (very) brief name for the parameter. -->
  |6label  = <!-- A (very) brief name for the parameter. -->
  |6aliases = <!-- List of aliases, separated by / (a slash) -->
  |6aliases = <!-- List of aliases, separated by / (a slash) -->
  |6type    = string
  |6type    = string
Line 50: Line 50:
  |7        = lang
  |7        = lang
  |7d-en    = Set the language of the text – it's important for right-to-left languages: their image is on the right and imageright is on the left.
  |7d-en    = Set the language of the text – it's important for right-to-left languages: their image is on the right and imageright is on the left.
  |7label  = <!-- A (very) brief name for the parameter. -->
  |7label  = <!-- A (very) brief name for the parameter. -->
  |7aliases = <!-- List of aliases, separated by / (a slash) -->
  |7aliases = <!-- List of aliases, separated by / (a slash) -->
  |7type    = string
  |7type    = string
Line 62: Line 62:
  |placement =
  |placement =
  |usage-notes =
  |usage-notes =
  |type =  
  |type =
  |example =  
  |example =
  |example-value =  
  |example-value =
  |i18n-method = -
  |i18n-method = -
  |i18n-desc =  
  |i18n-desc =
  |i18n-mediawiki-msg =  
  |i18n-mediawiki-msg =
  |i18n-subpage =  
  |i18n-subpage =
  |seealso =  
  |seealso =
  |setscats =  
  |setscats =
  |print = multi
  |print = multi
  |shorthand =  
  |shorthand =
  |relieson =  
  |relieson =
  |mustbesubst =  
  |mustbesubst =
  |useTemplateData = 1
  |useTemplateData = 1
}}
}}


==Examples==
== Examples ==
 
{{mbox
{{mbox
|text=warning - for speedy deletion and other serious notices
|text=warning for speedy deletion and other serious notices
|type=warning
|type=warning
}}
}}
{{mbox
{{mbox
|text=serious - for deletion notices
|text=serious for deletion notices
|type=serious
|type=serious
}}
}}
{{mbox
{{mbox
|text=issue - for larger issues
|text=issue for larger issues
|type=issue
|type=issue
}}
}}
{{mbox
{{mbox
|text=query - for minor issues
|text=query for minor issues
|type=query
|type=query
}}
}}
{{mbox
{{mbox
|text=style - for cleanup (only difference is different icon)
|text=style for cleanup (only difference is different icon)
|type=style
|type=style
}}
}}
{{mbox
{{mbox
|text=notice
|text=license for licenses (please note, the icon is an example, templates will still use their current icons where applicable)
|type=notice
}}
{{mbox
|text=license - for licenses (please note, the icon is an example, templates will still use their current icons where applicable)
|type=license
|type=license
}}
}}
{{mbox
{{mbox
|text=legal - for legal disclaimers such as {{tl|Trademark}}
|text=legal for legal disclaimers such as {{tl|Trademark}}
|type=legal
|type=legal
}}
}}
{{mbox
{{mbox
|text=protection - for protection notices
|text=protection for protection notices
|type=protection
|type=protection
}}
}}
{{mbox
{{mbox
|text=honor - for honors such as featured image
|text=honor for honors such as featured image
|type=honor
|type=honor
}}
}}
{{mbox
{{mbox
|text=growth - for other "good" notices
|text=growth for other "good" notices
|type=growth
|type=growth
}}
}}
{{mbox
{{mbox
|text=move - for move requests
|text=move for move requests
|type=move
|type=move
}}
{{mbox
|text=message
|type=message
}}
{{mbox
|text=notice (default)
|type=
}}
}}



Revision as of 22:36, 22 January 2015

This is used to create message boxes.

Usage

{{Mbox
 |text =
 |type =
 |image =
 |imageright =
 |textstyle =
 |style =
}}

Template parameters

ParameterDescriptionDefaultStatus
textThe text to be displayed.emptyoptional
typeChanges the color depending on the message needed. Each has its own preset image.noticeoptional
imageOverride the image ("none" for no image).depend on styleoptional
imagerightShow an image on the right side.emptyoptional
textstyleOverride default style of text (e.g. centering - "align:left" / "align:right" / "align:center").emptyoptional
styleOverride in custom style overrides for the template using CSS.emptyoptional
langSet the language of the text – it's important for right-to-left languages: their image is on the right and imageright is on the left.emptyoptional
<templatedata>JSON</templatedata> ./. {{TemplateBox}}
TemplateData

TemplateData is a way to store information about template parameters (the description of those and of the whole template) for both humans and machines. It is used by VisualEditor and possibly other tools like Upload Wizard.


Existing template documentation
At Wikimedia Commons, it is recommended to use {{TemplateBox}} with either ‎useTemplateData=1 or ‎useTemplateData=only on the ‎/doc subpage and transcluding it with {{Documentation}} into the template. ‎<nowiki>-tags can be wrapped around the arguments, if required, to avoid templates being expanded.

Newly created template documentation and imports
Another option, especially for imported templates, or for users with JSON experience, is placing raw ‎<templatedata>-tags into the Wikitext of the template, as described in various Wikipediae.


Wikipedia's help about TemplateDataCommons-specific information

This is used to create message boxes.

Template parameters

This template prefers block formatting of parameters.

ParameterDescriptionTypeStatus
image

Override the image ("none" for no image).

Default
depend on style
Page nameoptional
imageright

Show an image on the right side.

Page nameoptional
lang

Set the language of the text – it's important for right-to-left languages: their image is on the right and imageright is on the left.

Stringoptional
style

Override in custom style overrides for the template using CSS.

Stringoptional
text

The text to be displayed.

Lineoptional
textstyle

Override default style of text (e.g. centering - "align:left" / "align:right" / "align:center").

Stringoptional
type

Changes the color depending on the message needed. Each has its own preset image.

Default
notice
Stringoptional

Additional information

The template is intended to be used in the following namespaces: all namespaces

The template is intended to be used by the following user groups: all users

Localization

This template is not intended to be localized.

Examples

The style is different on categories. It uses {{Cmbox}} instead.

Cookies help us deliver our services. By using our services, you agree to our use of cookies.