మూస వికీపీడియా From Wikipedia, the free encyclopedia
This is the {{tmbox}}, or talk page message box, meta-template. This template is called by other templates to give a consistent structure and appearance to boilerplate messages used on talk pages across the project. It may be called directly on a talk page in order to present a one-off message in the same format as boilerplate messages, but this is non-standard (if a message is important enough to be presented in this form, you should consider creating a separate template so that it is easily available to other editors). Tmbox offers several different colors for different purposes, provides default images if no image parameter is given, and has some other pleasant features. This template works similarly to {{ambox}} and uses the same parameters.
This template should not be used for WikiProject banners. Such banners have special programming constraints that merit their own meta-templates. See the "See also" section below for links.
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.svg|40px]] smallimage = [[Image:Nuvola apps bookcase.png|30px]] |
smallimage
smallimage = [[Image:Crystal package settings.png|30px]]
small = yes imageright = [[Image:Nuvola apps bookcase.svg|40px]] |
small = yes imageright = [[Image:Nuvola apps bookcase.svg|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.
Similar templates:
There are several meta-templates in the mbox family:
Closely related meta-templates:
Other pages:
WikiProject banners:
Seamless Wikipedia browsing. On steroids.
Every time you click a link to Wikipedia, Wiktionary or Wikiquote in your browser's search results, it will show the modern Wikiwand interface.
Wikiwand extension is a five stars, simple, with minimum permission required to keep your browsing private, safe and transparent.