Template:Fmbox: Difference between revisions

1,534 bytes removed ,  3 years ago
m
45 revisions imported from templatewiki:Template:Fmbox
(Adding a visible error message when it gets an invalid type parameter, like we do for {{ambox}}.)
m (45 revisions imported from templatewiki:Template:Fmbox)
 
(32 intermediate revisions by 22 users not shown)
Line 1:
{{#invoke:Message box|fmbox}}<noinclude>
<table id="{{{id|}}}" class="plainlinks fmbox
{{#switch:{{{type|}}}
| warning = fmbox-warning
| editnotice = fmbox-editnotice
| system <!-- system = default -->
| #default = fmbox-system
}} {{{class|}}}" style="clear: both; margin: 0.2em 0; border: 1px solid #aaa; background: #f9f9f9; width: 100%;
{{#switch:{{{type|}}}
| warning = background: #FFDBDB; border: 1px solid #BB7070;
| editnotice = background: transparent;
| system <!-- system = default -->
| #default = background: #f9f9f9;
}} {{{style|}}}">
<tr>
{{#ifeq:{{{image|}}}|none
| <!-- No image. -->
| <td class="mbox-image">
{{#if:{{{image|}}}
| {{{image}}}
| {{#switch:{{{type|}}}
| warning = [[Image:Cmbox deletion.png|40x40px]]
| editnotice = [[Image:Imbox notice.png|40x40px]]
| system <!-- system = default -->
| #default = [[Image:Imbox notice.png|40x40px]]
}}
}}</td>
}}
<td class="mbox-text" style="{{{textstyle|}}}"> {{{text}}} </td>
{{#if:{{{imageright|}}}
| <td class="mbox-imageright"> {{{imageright}}} </td>
}}
</tr>
</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>[[Category:Wikipedia message box parameter needs fixing|{{main other|Main:}}{{FULLPAGENAME}}]]<!-- Sort on namespace -->
}}<noinclude>
 
{{pp-template|small=yes}}
{{documentation}}
<!-- Add categories and interwikis to the /doc subpage, not here! -->