Welcome to Warhammer 40k - Lexicanum! Log in and join the community.

Difference between revisions of "Template:Warning Message"

From Warhammer 40k - Lexicanum
Jump to: navigation, search
(Swapped to Mbox)
Line 1: Line 1:
<onlyinclude><includeonly>{|class="nottemplate warning"
+
{{mbox
|-
+
| type  = {{{type|content}}}
|class="icon"|[[Image:{{{Image|ServiceImage.jpg}}}|{{{ImageSize|50}}}px]]
+
| image = {{{image|[[File:ServiceImage.jpg|50px]]}}}
|class="message"|{{{Message}}} {{{Edit|{{{Break|<br />}}}You can help Lexicanum by <span class="plainlinks">[{{fullurl:{{FULLPAGENAME}}|action=edit}} fixing it].</span>}}}
+
| text  = {{{Message}}} {{{Edit|{{{Break|<br />}}}You can help Lexicanum by <span class="plainlinks">[{{fullurl:{{FULLPAGENAME}}|action=edit}} fixing it].</span>}}}
|}</includeonly></onlyinclude>
+
| small = {{{small|}}} / yes
 
+
| smalltext = An alternative text for the small version.
This template standardizes the shape of warning boxes. This should not be used for neutral messages, such as disambiguation or spoiler alerts, but just those messages that encourage the reader to fix the entry.
+
}}<noinclude>
 
+
{{documentation}}
The minimal syntax for this is
+
</noinclude>
<nowiki>{{Warning Message|Message=</nowiki>''*Write message here*''<nowiki>}}
+
<onlyinclude>[[Category:Notification Templates|Notification Templates]]
<noinclude>[[Category:Notification Templates|]]</noinclude></nowiki>
+
{{DEFAULTSORT:{{PAGENAME}}}}</onlyinclude>
which produces
 
{|class="nottemplate warning"
 
|-
 
|class="icon"|[[Image:{{{Image|ServiceImage.jpg}}}|50x50px]]
 
|class="message"|''*Write message here*''<br />You can help Lexicanum by <span class="plainlinks">[{{fullurl:{{FULLPAGENAME}}|action=edit}} fixing it].
 
|}
 
and puts the template in [[:Category:Notification Templates]].
 
 
 
== Optional parameters ==
 
 
 
This template also accepts the '''Image''' and '''Edit''' parameters:
 
*'''Image''' defines the icon to show in the box, if it's not specified it defaults to [[:Image:ServiceImage.jpg]].
 
*'''Edit''' should be set to an empty string in case the "You can help Lexicanum by fixing it." message is not needed. To display the message, just don't use the Edit parameter.
 
 
 
== Full syntax for copypasting ==
 
<nowiki>{{Warning Message
 
|Message=
 
|Image=
 
|ImageSize=
 
|Border=
 
|Edit=
 
|Break=
 
}}
 
<includeonly>[[Category:]]</includeonly>
 
<noinclude>[[Category:Notification Templates|]]</noinclude></nowiki>
 
{{DEFAULTSORT:{{PAGENAME}}}}
 
[[Category:Template-making Templates]]
 

Revision as of 13:34, 15 May 2015

[edit] [purge] Template-info.png Template documentation

This is the {{Warning Message}} meta-template.

This meta-template is a quick boilerplate for all the content issues templates.

Usage

Simple usage example:
{{Warning Message|text=Write message here}}

Complex example:

{{Warning Message
| type       = style
| small      = yes
| image      = [[File:Eldar.png|25px]]
| text       = Eldrad messed up the article again!
| edit       =
}}

Parameters

List of all parameters:

{{Warning Message
| type  = *Omit* (defaults to content) /speedy / delete / content / style / notice / move / protection
| image = *Omit* (defaults to [[File:ServiceImage.jpg|50px]]) / none / [[File:Some image.svg|40px]]
| text  = The message body text.
| edit  = *Omit* / *Empty*
| break = *Omit* / *Empty*
| small = *Omit* / {{{small|}}} / yes
}}

type

If no type parameter is given the template defaults to type content. That means it gets an orange coloring.

image

No parameter = If no image parameter is given the template uses this default image ServiceImage.jpg.
An image = Should be an image with usual wiki notation. 40px - 50px width are usually about right depending on the image height to width ratio. (Images over 52 pixels width will cause padding problems.) For example:
image = [[File:Unbalanced scales.svg|40px]]
none = Means that no image is used.
blank = This parameter is now deprecated. If you see it in use, change it to "image=none".

text

The message body text.

edit

No parameter = If no edit parameter is given the template will provide the automatic message prompting the user to edit the page and fix the error.
blank = A blank parameter will remove the edit link.

break

Only relevant if there's no edit parameter.
No parameter = If no break parameter is given a line break will be introduced between the text message and the edit message.
blank = A blank parameter will put both messages on the same line.

small

The small article message boxes are meant for the top of sections. Normally they should only contain one or two lines of text.
yes = Makes it a smaller left aligned message box (right aligned when used in template pages).
small = {{{small|}}}