More actions
wp>Hoangminhle2011 No edit summary |
m 1 revision imported |
||
(No difference)
|
Latest revision as of 13:54, 11 October 2024
This template is used to add consistent styling to message boxes.
Usage
{{Message box | mini = Mini mode | small = Mini mode | subtle = Subtle mode | class = Classes for the template | type = Notice type | bgcol = Custom background color | linecol = Custom line color | width = Custom width | float = Custom alignment | icon = Icon from Template:CommentSprite | imagecss = Custom image CSS | image = Extra image | imagetextbefore = Text before the image | imagetextafter = Text after the image | imagesize = Image size | title = Template title | discuss = Discuss button | discussPage = Talk page link | discussAnchor = Talk page section specification | linkshere = Links button to Special:WhatLinksHere | text = Template text | css = Custom CSS }}
Parameters
Message boxes are used to create most templates present on the wiki.
Parameter | Description | Type | Status | |
---|---|---|---|---|
Mini mode | mini small | Changes the message box size to one that is more suited to an article section. | Boolean | optional |
Subtle mode | subtle | Changes the message box to be smaller and float to the side in line with an infobox. | Boolean | optional |
Type | type | Message box notice category. See [[#Types]].
| String | optional |
Class | class | Adds class to the template. | String | suggested |
Background color | bgcol | Changes the background color.
| String | optional |
Line color | linecol | Changes the line color. | String | optional |
Width | width | Changes the template width.
| String | optional |
Alignment | float | Changes the template position. | String | optional |
Icon | icon | Adds an icon from Template:CommentSprite. Incompatible with the {{{image}}} parameter and its derivatives. | String | optional |
Image CSS customization | imagecss | Further customization of an image on the message box with CSS. | String | optional |
Image | image | Adds an image icon to the template. Incompatible with the {{{icon}}} parameter. (Note: Images do not display in mobile view.) | File | optional |
Additional text | imagetextbefore | Adds a text before/above the image. | String | optional |
Additional text | imagetextafter | Adds a text after/below the image. | String | optional |
Image size | imagesize | Changes the image size if the {{{image}}} parameter is set.
| String | optional |
Title | title | Adds a title to the template. | String | suggested |
Discuss button? | discuss | Adds a button named [Discuss] that links to the talk page of the page where the message box is used. | Boolean | optional |
Talk page link customization | discussPage | Changes the [Discuss] button to link to a custom talk page. | Page name | optional |
Talk page section specification | discussAnchor | Makes the [Discuss] button to link to a specific section of the talk page. | String | optional |
Links button? | linkshere | Adds a button named [Links] that links to Special:WhatLinksHere which lists the page usage of the current page. | Boolean | optional |
Text | text | Adds text to the template. | Content | suggested |
CSS customization | css | Further customization of the message box with CSS. | String | optional |
Types
Colors are used to indicate the type of message box:
Criteria | Type | Color displayed |
---|---|---|
Unclassified templates (default) | Lorem ipsum
| |
Warning for disclaimer/deletion of a page | type = delete
|
Lorem ipsum
|
Suggesting a page to be moved/split/merged | type = move
|
Lorem ipsum
|
Notice for content issues of a page | type = content
|
Lorem ipsum
|
Notice for style issues of a page | type = style
|
Lorem ipsum
|
Information regarding the status of a page | type = notice
|
Lorem ipsum
|
Details about editions and/or versions | type = edition
|
Lorem ipsum
|
Unused/custom purposes | type = other
|
Lorem ipsum
|
Examples
Code | Result |
---|---|
Basic usage:
{{msgbox | title = This is a normal message box | text = With helpful and descriptive subtext }} |
This is a normal message box
With helpful and descriptive subtext
|
Mini usage:
{{msgbox | mini = 1 | icon = 8 | text = This has an information icon using [[Template:CommentSprite]] }} |
This has an information icon using Template:CommentSprite
|
Advanced usage:
{{msgbox | bgcol = rgba(203, 203, 249, 0.2) | linecol = rgba(107, 107, 253, 0.2) | title = This is a blue message box | text = It has a discuss link, some custom CSS and a custom image | discuss = 1 | image = Bot.png | css = box-shadow: 10px 10px 2px #787878; }} |
This is a blue message box [discuss]
It has a discuss link, some custom CSS and a custom image
|
Advanced mini usage:
{{msgbox | mini = 1 | image = Bot.png | bgcol = rgba(147, 122, 85, 0.2) | linecol = rgba(187, 116, 13, 0.2) | css = box-shadow: 0px 0px 6px #787878; | text = This is using similar settings as the advanced example above. }} |
This is using similar settings as the advanced example above.
|
cs:Šablona:Message box/doc
de:Vorlage:Hinweis/Dokumentation
es:Plantilla:Messagebox/doc
fr:Modèle:Msgbox/doc
it:Template:Message box/doc
ja:テンプレート:Message box/doc
ko:틀:Message box/doc
lzh:模板:Message box/doc
nl:Sjabloon:Mededeling/doc
pl:Szablon:Msgbox/opis
pt:Predefinição:Caixa de mensagem/doc
ru:Шаблон:Msgbox/док
th:แม่แบบ:Message box/doc
uk:Шаблон:Message box/док
zh:Template:Message box/doc