This template is used to add consistent styling to message boxes.
Usage
Note:
* Add the missing info about the 3 parameters using an "?".
{{Message box
| mini = Mini mode
| small = Mini mode
| class = Classes for the template
| bgcol = Custom background color
| linecol = Custom line color
| width = Custom width
| float = Custom alignment
| icon = Icon from Template:CommentSprite
| imagecss = ?
| image = Extra image
| imagetextbefore = ?
| imagetextafter = ?
| 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. The following table shows a description of the parameter usage of this template.
| 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 |
| 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 |
| ? | imagecss | ?. | String | optional |
| Image | image | Adds an image icon to the template. Incompatible with the {{{icon}}} parameter. | File | optional |
| ? | imagetextbefore | ?. | String | optional |
| ? | imagetextafter | ?. | 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 |
Color criteria
Colors are used to indicate the type of message box:
| Criteria | Class code | Color displayed |
|---|---|---|
| Unclassified templates (default) | ||
| Warning for disclaimer/deletion of a page | class = msgbox-red
|
|
| Suggesting a page to be moved/split/merged | class = msgbox-purple
|
|
| Notice for content issues of a page | class = msgbox-orange
|
|
| Notice for style issues of a page | class = msgbox-yellow
|
|
| Information regarding the status of a page | class = msgbox-green
|
|
| Details about editions and/or versions | class = msgbox-blue
|
|
| Unused/custom purposes | class = msgbox-magenta
|
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 is a mini message box with an information icon using [[Template:CommentSprite]]
}}
|
This is a mini message box with an information icon using Template:CommentSprite
|
Advanced usage:
{{msgbox
| bgcol = #eef
| linecol = #ddf
| 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 #888;
}}
|
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 = #ddc
| linecol = #dcb
| css = box-shadow: 0px 0px 6px #888;
| text = This is a mini message box, it is using similar settings as the box used in the advanced example above.
}}
|