Halaman ini punya templat digunakan pada 2,550,000+ laman, atau lebih kurang 228% dari semua laman. Untuk mengelakkan gangguan besar-besaran dan muatan pelayan , sebarang perubahan sepatutnya diuji pada templat punya subhalaman kotak pasir atau laman uji kaji, atau pada sublaman pengguna anda. Perubahan yang sudah diuji boleh ditambah pada laman ini dalam suntingan tunggal. Pertimbang untuk membincang perubahan pada laman perbincangan sebelum melaksanakannya. Preview message: Transclusion count updated automatically (see documentation). |
Templat:Mbox templates 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 should normally not be used for WikiProject banners. They have special needs and thus have their own meta-templates. See the "See also" section below for links.
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|50px]] smallimage = [[Image:Nuvola apps bookcase.png|30px]] |
smallimage
smallimage = [[Image:Crystal package settings.png|30px]]
small = yes imageright = [[Image:Nuvola apps bookcase.png|50px]] 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.
There are several meta-templates in the mbox family:
Other pages:
WikiProject banners: