This template is used to add consistent styling to message boxes.
Usage
Note:
* Add the missing info about the 3 parameters using an "?"
* Make a proper parameters section, explaining their usage.
** It should use a templatedata table.
{{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 changer
|title = Template title text
|discuss = Discuss button enabler
|discussPage = Talk page changer
|discussAnchor = Talk page section specifier
|linkshere = Links 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 | Changes the message box size to one that is more suited to an article section. | Boolean | optional |
| Mini mode | small | Changes the message box size to one that is more suited to an article section. | Boolean | optional |
| Class | class | Adds a class to the template. | String | suggested |
| Background color | bgcol | Changes the background color. | Boolean | optional |
| Line color | linecol | Changes the line color. | Boolean | optional |
| Width | width | Changes the template width. | Boolean | optional |
| Alignment | float | Changes the template position. | Boolean | optional |
| Template icon | icon | Adds a icon from [[Template:CommentSprite]]. Not compatible with {{cd|image}} nor its variants. | Boolean | optional |
| ? | imagecss | ?. | Boolean | optional |
| Template image | image | Adds a image to the template. | Boolean | optional |
| ? | imagetextbefore | ?. | Boolean | optional |
| ? | imagetextafter | ?. | Boolean | optional |
| Image size | imagesize | Changes the image size if there is one. | Boolean | optional |
| Title text | title | Adds a title to the template. | String | suggested |
| Button enabler | discuss | Adds a button called [Discuss] that links to the talk page of the page where the message box is used. | Boolean | optional |
| Talk page changer | discussPage | Changes the [Discuss] button to link to a custom talk page. | Boolean | optional |
| Talk page section specifier | discussAnchor | Makes the [Discuss] button to link to a specific section of the talk page. | Boolean | optional |
| Button enabler | linkshere | Adds a button called [Links] which shows what pages use/link to the message box on [[Special:WhatLinksHere/]]. | Boolean | optional |
| Text | text | Adds text to the template. | String | suggested |
| Css customizer | css | Changes the css style of the template to a custom one. | Boolean | optional |
Color criteria
When a template uses Message boxes to make its contents, it must follow a certain color criteria if it belongs to any of the following criteria:
| 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 maintenance/editing-related actions of a page | class = msgbox-yellow
|
|
| Information regarding the status of a page | class = msgbox-green
|
|
| Information regarding the content of a page | class = msgbox-orange
|
|
| 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.
}}
|