Difference between revisions of "Template:Warning Message/doc"
From Warhammer 40k - Lexicanum
(Created page with "{{Documentation subpage}} This is the <tt>'''{{tl|Warning Message}}'''</tt> meta-template. This meta-template is a quick boilerplate for all the content issues templates. ==...") |
(→Usage) |
||
| Line 12: | Line 12: | ||
{{Warning Message|Message=*Write message here*}} | {{Warning Message|Message=*Write message here*}} | ||
| + | |||
| + | Complex example: | ||
| + | <pre> | ||
| + | {{Warning Message | ||
| + | | type = style | ||
| + | | small = yes | ||
| + | | image = [[File:Eldar.png|25px]] | ||
| + | | text = Eldrad messed up the article again! | ||
| + | | edit = | ||
| + | }} | ||
| + | </pre> | ||
| + | |||
| + | {{Warning Message | ||
| + | | type = style | ||
| + | | small = yes | ||
| + | | image = [[File:Eldar.png|25px]] | ||
| + | | text = Eldrad messed up the article again! | ||
| + | | edit = | ||
| + | }}<div style="clear:both"></div> | ||
| + | |||
| + | === Parameters === | ||
| + | |||
| + | List of all parameters: | ||
| + | | type = {{{type|content}}} | ||
| + | | image = {{{image|[[File:ServiceImage.jpg|50px]]}}} | ||
| + | | text = {{{text}}} {{{edit|{{{break|<br />}}}You can help Lexicanum by <span class="plainlinks">[{{fullurl:{{FULLPAGENAME}}|action=edit}} fixing it].</span>}}} | ||
| + | | small = {{{small|}}} | ||
| + | <pre> | ||
| + | {{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 | ||
| + | }} | ||
| + | </pre> | ||
| + | |||
| + | Note: The small parameters only have effect when the template is on an article, talk page or an "other" page. Using the small parameters when they are not valid has no effect, but also does no harm. | ||
| + | |||
| + | '''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 [[File:ServiceImage.jpg|50px]]. | ||
| + | :'''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: | ||
| + | ::<code><nowiki>image = [[File:Unbalanced scales.svg|40px]]</nowiki></code> | ||
| + | :'''none''' = Means that no image is used. | ||
| + | :<s>'''blank'''</s> = 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. | ||
| + | :<s>'''blank'''</s> = 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. | ||
| + | :<s>'''blank'''</s> = A blank parameter will put both messages on the same line. | ||
| + | |||
| + | ==== The small parameters ==== | ||
| + | |||
| + | The small article message boxes are meant for the top of sections. Normally they should only contain one or two lines of text. | ||
| + | |||
| + | '''small''' | ||
| + | :'''yes''' = Makes it a smaller left aligned message box (right aligned when used in template pages). | ||
| + | ::<code><nowiki>small = {{{small|}}}</nowiki></code><includeonly> | ||
| + | {{DEFAULTSORT:Warning Message}} | ||
| + | [[Category:Template-making Templates]] | ||
| + | </includeonly> | ||
Revision as of 14:03, 15 May 2015
|
|
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|Message=*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:
| type = content
| image =
| text = {{{text}}}
You can help Lexicanum by fixing it.
| small =
{{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
}}
Note: The small parameters only have effect when the template is on an article, talk page or an "other" page. Using the small parameters when they are not valid has no effect, but also does no harm.
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
. - 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.
The small parameters
The small article message boxes are meant for the top of sections. Normally they should only contain one or two lines of text.
small
- yes = Makes it a smaller left aligned message box (right aligned when used in template pages).
small = {{{small|}}}