![]() |
![]() | This template is used on 19,000+ pages and changes may be widely noticed. Test changes in the template's /sandbox or /testcases subpages, or in your own user subpage. Consider discussing changes on the talk page before changing this template. |
Message box meta-templates | |
---|---|
template | context |
((Ambox)) | article |
((Cmbox)) | category |
((Imbox)) | image |
((Tmbox)) | talk |
((Fmbox)) | footer / header |
((Ombox)) | other pages |
((Mbox)) | auto-detect |
((Asbox)) | article stub |
((Dmbox)) | disambiguation |
This is the ((tmbox)) or talk page message box meta-template.
It is used to build message box templates for talk pages, such as ((central)) etc. It offers several different colours, uses default images if no image parameter is given and it has some other features.
This template works similarly to ((ambox)) and uses the same parameters.
After discussions on the talk page of this template and announcing it at several places for some time we are now deploying this template. Feel free to convert any message boxes used on talk pages to use this meta-template. If you find any tricky cases then list them on the talk page of this template and you'll get help.
When this template is used to build talk page message boxes those boxes should contain explanatory texts just like before. (The same texts as before or new improved texts.) If there are more specific images in the boxes or you know a better image, then use them instead of the default images shown here.
The types of talkpage messageboxes follow the same naming convention as the boxes for all other namespaces, but the type of any particular talkpage messagebox may not be as obvious as in other namespaces. When deciding on the type to use for a talkpage messagebox, please consider the following guidelines:
Simple usage example:
((tmbox | text = Some text.))
![]() | Some text. |
Complex example:
((tmbox | type = style | image = [[Image:Emblem-question-yellow.svg|40px]] | style = width: 400px; | textstyle = color: red; font-weight: bold; font-style: italic; | text = The message body text. ))
![]() | The message body text. |
The following examples use different type parameters but use no image parameters thus they use the default images for each type.
![]() | type=speedy – Speedy deletion templates. |
![]() | type=delete – Deletion templates. |
![]() | type=content – Major warnings and problems. |
![]() | type=style – Minor warnings and problems. |
![]() | type=notice – Notices and messages of any kind, both permanent and temporary. |
![]() | type=move – Merge, split, rename and transwiki messages and proposals. |
![]() | type=protection – Protection templates. |
Some other parameter combinations.
![]() | No type and no image given (default) |
No type and image=none – No image is used and the text uses the whole message box area. |
![]() | image = [[Image:Gnome globe current event.svg|42px]] imageright = [[Image:Nuvola apps bookcase.svg|40px]] | ![]() |
List of all parameters:
((tmbox | type = speedy / delete / content / style / notice / move / protection | image = none / [[Image:Some image.svg|40px]] | imageright = [[Image:Some image.svg|40px]] | style = CSS values | textstyle = CSS values | text = The message body text. | small = (({small|))} / yes | smallimage = none / [[Image:Some image.svg|30px]] | smallimageright = none / [[Image:Some image.svg|30px]] | smalltext = A shorter message body text. ))
type
image
image = [[Image:Crystal package settings.png|40px]]
imageright
imageright = [[Image:Nuvola apps bookcase.png|40px]]
style
" "
but with the ending semicolons ;
. For example:
style = margin-bottom: 0.5em;
textstyle
textstyle = text-align: center;
text
![]() | small = yes |
![]() | type = style small = yes |
small
small = (({small|))}
![]() | small = yes image = [[Image:Nuvola apps bookcase.png|40px]] smallimage = [[Image:Nuvola apps bookcase.png|30px]] |
smallimage
smallimage = [[Image:Crystal package settings.png|30px]]
![]() | small = yes imageright = [[Image:Nuvola apps bookcase.png|40px]] | ![]() |
![]() | small = yes imageright = [[Image:Nuvola apps bookcase.png|40px]] smallimageright = none |
smallimageright
smallimageright = [[Image:Nuvola apps bookcase.png|30px]]
smalltext
If you need to use special characters in the text parameter then you need to escape them like this:
((tmbox | text = <div> Equal sign = and a start and end brace { } work fine as they are. But here is a pipe ((!)) and two end braces <nowiki>))</nowiki>. And now a pipe and end braces <nowiki>|))</nowiki>. </div> ))
![]() | Equal sign = and a start and end brace { } work fine as they are. But here is a pipe | and two end braces )). And now a pipe and end braces |)). |
This template uses the tmbox CSS classes in MediaWiki:Common.css for most of its looks, thus it is fully skinnable.
This template calls ((tmbox/core)) which holds most of the code for ((tmbox)), while ((tmbox)) itself does parameter preprocessing.
Internally this meta-template uses HTML markup instead of wiki markup for the table code. That is the usual way we make meta-templates since wiki markup has several drawbacks. For instance it makes it harder to use parser functions and special characters in parameters.
For more technical details see the talk page. Since this template works almost exactly like ((ambox)), ((imbox)), ((cmbox)) and ((ombox)) their talk pages and related pages might also contain more details.