Template:Fmbox: Difference between revisions
From BetaArchive Wiki
wikibooks.org>Davidgothberg (Adding the "class" parameter. It is needed so system messages can be skinned individually.) |
m (Protected "Template:Fmbox": High traffic page ([Edit=Allow only autoconfirmed users] (indefinite) [Move=Allow only autoconfirmed users] (indefinite))) |
||
(26 intermediate revisions by 14 users not shown) | |||
Line 1: | Line 1: | ||
<table class="plainlinks fmbox | <table id="{{{id|}}}" class="plainlinks fmbox | ||
{{#switch:{{{type|}}} | {{#switch:{{{type|}}} | ||
| warning = fmbox-warning | |||
| editnotice = fmbox-editnotice | | editnotice = fmbox-editnotice | ||
| system | | system | ||
| #default = fmbox-system | | #default = fmbox-system | ||
}} {{{class|}}}" style=" | }} {{{class|}}}" style="{{{style|}}}"> | ||
<tr> | <tr> | ||
{{#ifeq:{{{image|}}}|none | {{#ifeq:{{{image|}}}|none | ||
| <!-- No image. --> | | <!-- No image. --> | ||
| <td class="mbox-image | | <td class="mbox-image"> | ||
{{#if:{{{image|}}} | {{#if:{{{image|}}} | ||
| {{{image}}} | | {{{image}}} | ||
| [[ | | [[File:{{#switch:{{{type|}}} | ||
| warning = Ambox warning pn.png | |||
| editnotice = Information icon4.png | |||
| system <!-- system = default --> | |||
| #default = Information icon4.png | |||
}}|40x40px|link=|alt=]] | |||
}}</td> | }}</td> | ||
}} | }} | ||
<td class="mbox-text" style=" | <td class="mbox-text" style="{{{textstyle|}}}"> {{{text}}} </td> | ||
{{#if:{{{imageright|}}} | {{#if:{{{imageright|}}} | ||
| <td class="mbox-imageright | | <td class="mbox-imageright"> {{{imageright}}} </td> | ||
}} | }} | ||
</tr> | </tr> | ||
</table>< | </table><!-- | ||
Detect and report usage with faulty "type" parameter: | |||
{{ | -->{{#switch:{{{type|}}} | ||
| <!-- No type fed, is also valid input --> | |||
| warning | |||
| editnotice | |||
| system = <!-- Do nothing, valid "type" --> | |||
| #default = <div style="text-align: center;">This message box is using an invalid "type={{{type|}}}" parameter and needs fixing.</div> | |||
}}<noinclude> | |||
<!-- Add categories and interwikis to the /doc subpage, not here! --> | <!-- Add categories and interwikis to the /doc subpage, not here! --> | ||
</noinclude> | </noinclude> | ||
<noinclude>[[Category:Templates|{{PAGENAME}}]]</noinclude> |
Latest revision as of 14:21, 9 July 2021
{{{text}}} |