Difference between revisions of "Template:Fmbox"
|  (add id parameter (sorry to steal your edit, DG, but I'm bored and now intend spending a happy hour adding the parameter to all its instances :-D)) |  (Adding "type=warning" with "fmbox-warning" class and "Image:Cmbox deletion.png". Adding error reporting of faulty "type" parameter.) | ||
| Line 1: | Line 1: | ||
| <table id="{{{id|}}}" 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          <!-- system = default --> | ||
| Line 6: | Line 7: | ||
| }} {{{class|}}}" style="clear: both; margin: 0.2em 0; border: 1px solid #aaa; background: #f9f9f9; width: 100%;   | }} {{{class|}}}" style="clear: both; margin: 0.2em 0; border: 1px solid #aaa; background: #f9f9f9; width: 100%;   | ||
| {{#switch:{{{type|}}} | {{#switch:{{{type|}}} | ||
| + | | warning    = background: #FFDBDB; border: 1px solid #BB7979; | ||
| | editnotice = background: transparent; | | editnotice = background: transparent; | ||
| | system          <!-- system = default --> | | system          <!-- system = default --> | ||
| Line 16: | Line 18: | ||
|    {{#if:{{{image|}}} |    {{#if:{{{image|}}} | ||
|    | {{{image}}} |    | {{{image}}} | ||
| − |    | [[Image:Imbox notice.png|40x40px]] | + |    | {{#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> | ||
| }} | }} | ||
| Line 24: | Line 31: | ||
| }} | }} | ||
| </tr> | </tr> | ||
| − | </table><noinclude> | + | </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   = [[Category:Wikipedia message box parameter needs fixing|{{main other|Main:}}{{FULLPAGENAME}}]]<!-- Sort on namespace --> | ||
| + | }}<noinclude> | ||
| {{pp-template|small=yes}} | {{pp-template|small=yes}} | ||
Revision as of 16:08, 28 October 2008
| 40x40px | {{{text}}} | 
| Editors can experiment in this template's sandbox (create) and testcases (create) pages. Please add categories and interwikis to the /doc subpage. Subpages of this template. |