Template:Fmbox: Difference between revisions

From BetaArchive Wiki
wikibooks.org>Davidgothberg
m (Protected Template:Fmbox: This box is intended for several system messages. Thus the moment it gets used it will be very high-risk. ([edit=sysop] (indefinite) [move=sysop] (indefinite)))
m (Protected "Template:Fmbox": High traffic page ([Edit=Allow only autoconfirmed users] (indefinite) [Move=Allow only autoconfirmed users] (indefinite)))
 
(29 intermediate revisions by 14 users not shown)
Line 1: Line 1:
<table class="plainlinks fmbox" style="clear: both; margin: 0.2em 0; border: 1px solid #aaa; background: #f9f9f9; width: 100%; {{{style|}}}">
<table id="{{{id|}}}" class="plainlinks fmbox
{{#switch:{{{type|}}}
| warning    = fmbox-warning
| editnotice = fmbox-editnotice
| system         
| #default  = fmbox-system
}} {{{class|}}}" style="{{{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 -->
<!-- Add categories and inter-wikis to the /doc subpage, not here! -->
| 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! -->
</noinclude>
</noinclude>
<noinclude>[[Category:Templates|{{PAGENAME}}]]</noinclude>

Latest revision as of 14:21, 9 July 2021