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 -->
| system           
| #default  = fmbox-system
| #default  = fmbox-system
}} {{{class|}}}" style="clear: both; margin: 0.2em 0; border: 1px solid #aaa; background: #f9f9f9; width: 100%;
}} {{{class|}}}" style="{{{style|}}}">
{{#switch:{{{type|}}}
| editnotice = background: transparent;
| system          <!-- system = default -->
| #default  = background: #f9f9f9;
}} {{{style|}}}">
<tr>
<tr>
{{#ifeq:{{{image|}}}|none
{{#ifeq:{{{image|}}}|none
| <!-- No image. -->
| <!-- No image. -->
| <td class="mbox-image" style="border: none; padding: 2px 0 2px 0.9em; text-align: center;">
| <td class="mbox-image">
   {{#if:{{{image|}}}
   {{#if:{{{image|}}}
   | {{{image}}}
   | {{{image}}}
   | [[Image:Imbox notice.png|40x40px]]
   | [[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="border: none; padding: 0.25em 0.9em; width: 100%; {{{textstyle|}}}"> {{{text}}} </td>
<td class="mbox-text" style="{{{textstyle|}}}"> {{{text}}} </td>
{{#if:{{{imageright|}}}
{{#if:{{{imageright|}}}
| <td class="mbox-imageright" style="border: none; padding: 2px 0.9em 2px 0; text-align: center;"> {{{imageright}}} </td>
| <td class="mbox-imageright"> {{{imageright}}} </td>
}}
}}
</tr>
</tr>
</table><noinclude>
</table><!--
 
  Detect and report usage with faulty "type" parameter:
{{pp-template|small=yes}}
-->{{#switch:{{{type|}}}
{{documentation}}
|  <!-- 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