https://kumu.tru.ca/index.php?title=Template:Mbox/doc&feed=atom&action=historyTemplate:Mbox/doc - Revision history2024-03-29T13:04:10ZRevision history for this page on the wikiMediaWiki 1.35.8https://kumu.tru.ca/index.php?title=Template:Mbox/doc&diff=405&oldid=prevWikiadmin: 1 revision2013-10-24T22:09:29Z<p>1 revision</p>
<p><b>New page</b></p><div>==Usage==<br />
<br />
This is the {{tlx|mbox}} or ''' message box''' meta-template.<br />
<br />
It is used to build message box templates, using CSS classes to reskin it for specific namespaces. It offers several different colours, uses default images if no image parameter is given and it has some other features.<br />
<br />
=== Usage ===<br />
<br />
<pre><br />
{{mbox<br />
| type = query (optional)<br />
| image = Emblem-question-yellow.svg (optional)<br />
| style = width:400px; color:red; font-weight:bold; font-style:italic; (optional)<br />
| text = The message body text.<br />
}}<br />
</pre><br />
<br />
{{mbox<br />
| type = query<br />
| image = Emblem-question-yellow.svg<br />
| style = width:400px; color:red; font-weight:bold; font-style:italic;<br />
| text = The message body text.<br />
}}<br />
<br />
=== Message box types ===<br />
{{msg:mbox|type=warning|text=warning}}<br />
{{msg:mbox|type=serious|text=serious}}<br />
{{msg:mbox|type=content|text=content}}<br />
{{msg:mbox|type=style|text=style}}<br />
{{msg:mbox|type=merge|text=merge or move}}<br />
{{msg:mbox|type=notice|text=notice}}<br />
{{msg:mbox|type=growth|text=growth}}<br />
{{msg:mbox|type=idea|text=idea}}<br />
{{msg:mbox|type=query|text=query}}<br />
<br />
=== Image message box types ===<br />
<br />
In the Image namespace, several additional options are available. It is recommended you still use {{tl|imbox}} for these boxes in the meantime, as imbox uses different markup in line with other Ambox implementations and the image margins used on mbox are different.<br />
<div class="ns-6"><br />
{{msg:mbox|type = warning|text = type=<u>warning</u> – Speedy deletion templates}}<br />
{{msg:mbox|type = serious|text = type=<u>serious</u> – Deletion templates}}<br />
{{msg:mbox|type = content|text = type=<u>content</u> – Major warnings and problems}}<br />
{{msg:mbox|type = query|text = type=<u>query</u> – Minor warnings and problems}}<br />
{{msg:mbox|type = notice|text = type=<u>notice</u> – Notices and messages of any kind, both permanent and temporary.}}<br />
{{msg:mbox|type = free|text = type=<u>free</u> – Free licensed content}}<br />
{{msg:mbox|type = pd|text = type=<u>pd</u> – Public domain content.}}<br />
{{msg:mbox|type = nonfree|text = type=<u>nonfree</u> – Copyrighted non-free content.}}<br />
{{msg:mbox|type = move|text = type=<u>move</u> – For moving templates}}<br />
</div><br />
<br />
=== Other images ===<br />
<br />
The default images shown above are mostly for convenience. In many cases it is more appropriate to use more specific images. These examples use the '''image''' parameter to specify an image other than the default images.<br />
<br />
<div class="ns-6"><br />
{{msg:mbox|type = query|image = Gnome-dev-camera.svg|text = type = query <br/> image = Gnome-dev-camera.svg}}<br />
{{msg:mbox|type = move|image = To Commons.svg|text = type = move <br/> image = To Commons.svg}}<br />
{{msg:mbox|type = free|image = Heckert GNU white.svg|text = type = free <br/> image = Heckert GNU white.svg <br/> This image is used for the GFDL license templates such as {{tlx|GFDL}}.}}<br />
</div><br />
<br />
=== Special ===<br />
<br />
Some other parameter combinations.<br />
<br />
{{msg:mbox|text = No type and no image given ('''default''')}}<br />
{{msg:mbox|image = none|text = No type and '''image=none''' – No image is used and the '''text''' uses the whole message box area.}}<br />
<br />
=== Technical details ===<br />
<br />
This template uses CSS classes.<br />
<br />
If you need to use special characters in the text parameter then you need to escape them like this: <br />
<br />
<pre><br />
{{mbox<br />
| text = <div><br />
Equal sign = and a start and end brace { } work fine as they are. <br />
But here is a pipe {{!}} and two end braces &lt;nowiki>}}&lt;/nowiki>. <br />
And now a pipe and end braces &lt;nowiki>|}}&lt;/nowiki>.<br />
</div><br />
}}<br />
</pre><br />
<br />
{{msg:mbox<br />
| text = <div><br />
Equal sign = and a start and end brace { } work fine as they are. <br />
But here is a pipe {{!}} and two end braces <nowiki>}}</nowiki>. <br />
And now a pipe and end braces <nowiki>|}}</nowiki>.<br />
</div><br />
}}<br />
<br />
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 [[m:Help:ParserFunctions|parser functions]] and special characters in parameters.<br />
<noinclude>[[Category:Template documentation|{{PAGENAME}}]]</noinclude></div>Wikiadmin