2,191
edits
(Created page with '<table {{#if:{{{id|}}}|id="{{{id|}}}"}} class="plainlinks fmbox {{#switch:{{{type|}}} | warning = fmbox-warning | editnotice = fmbox-editnotice | system <!-- system =…') |
m (using Image: consistently to make it easier to find all image refs on a page) |
||
| (4 intermediate revisions by one other user not shown) | |||
| Line 1: | Line 1: | ||
<table {{#if:{{{id|}}}|id="{{{id|}}}"}} class="plainlinks fmbox | <includeonly><table {{#if:{{{id|}}}|id="{{{id|}}}"}} class="plainlinks fmbox | ||
{{#switch:{{{type|}}} | {{#switch:{{{type|}}} | ||
| warning = fmbox-warning | | warning = fmbox-warning | ||
| Line 12: | Line 12: | ||
{{#if:{{{image|}}} | {{#if:{{{image|}}} | ||
| {{{image}}} | | {{{image}}} | ||
| [[ | | [[Image:{{#switch:{{{type|}}} | ||
| warning = Cmbox deletion.png | | warning = Cmbox deletion.png | ||
| editnotice = Imbox notice.png | | editnotice = Imbox notice.png | ||
| Line 33: | Line 33: | ||
| system = <!-- Do nothing, valid "type" --> | | 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 --> | | #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> | }}</includeonly><noinclude>Gonna be honest — I basically brought this over as a hasty cut-and-paste so I could get the [[Template:Script doc auto]] system to work. This is one of Wikipedia's standard templates for making message boxes with the color and message icon of your choice. The template is somewhat redundant of [[Template:Divbox]], except that this is a more powerful, less user-friendly version. '''--Iritscen'''<br /> | ||
[[Category: | |||
'''Sample usages'''<br /> | |||
The most interesting parameter is "type" — you can choose either "warning", "editnotice", or "system". These types have different appearances, based on classes defined in [[MediaWiki:Common.css]]. We'll explore a few ways to use Fmbox below, but see the link at the bottom for more information on the many abilities of this template. | |||
First let's start with a basic warning-type box. | |||
<pre>{{fmbox | |||
| type = warning | |||
| text = Warning. You did not tie your shoelaces. Ha ha. Made you look. | |||
}}</pre> yields: | |||
{{fmbox | |||
| type = warning | |||
| text = Warning. You did not tie your shoelaces. Ha ha. Made you look. | |||
}} | |||
Here we define our own background, so we don't bother with passing in a "type": | |||
<pre>{{fmbox | |||
| style = background: #ecfcf4; | |||
| image = none | |||
| text = Sorry, even computers need to lighten things up once in a while. | |||
}}</pre> yields: | |||
{{fmbox | |||
| style = background: #ecfcf4; | |||
| image = none | |||
| text = Sorry, even computers need to lighten things up once in a while. | |||
}} | |||
For a generic "info" message, you can keep it simple (no image parameter is given, so Fmbox uses the icon from its "editnotice" style, but the "system" style for the box's appearance): | |||
<pre>{{fmbox | |||
| text = Computers make bad jokes. | |||
}}</pre> yields: | |||
{{fmbox | |||
| text = Computers make bad jokes. | |||
}} | |||
<br /><br /> | |||
This was just Fmbox 101; there's a ton more functionality in this template, but I'm not going to document it all here. Read the template's original docs here for all the gory details: [[wikipedia:Template:Fmbox]]. | |||
[[Category:Message box templates]] | |||
</noinclude> | </noinclude> | ||