Difference between revisions of "Template:Alert"

From Audacity Wiki
Jump to: navigation, search
(fix missing "1=" in one of the examples)
(edit to match Manual alert template)
 
Line 51: Line 51:
 
''Ignore the following, it's only a representation of formatting and a parameter dummy.''
 
''Ignore the following, it's only a representation of formatting and a parameter dummy.''
 
</noinclude>
 
</noinclude>
{|style="background:#FFCCCC; color:black; border:1px solid #CC0000; padding-top:10px; padding-bottom:10px; padding-left:10px; padding-right:25px" width="90%" align="center"  
+
<div style="margin:24px">
 +
{|style="background:#FFCCCC; color:black; border:1px solid #CC0000; padding-left:12px; padding-right:12px" width="100%" align="center"
 
|-
 
|-
|width=7% valign="top"|[[Image:Attnpink.png|none|30px|Warning!]]
+
|width=30px valign="top" align="center"|[[Image:stopicon.png|Warning icon]]
|width=93% align="left" valign="top"|{{{1}}}
+
|align="left" valign="top"|{{{1}}}
 
|}
 
|}
 +
</div>

Latest revision as of 14:42, 2 May 2012

The Alert Template formats text inside a standard pink box with an image of an exclamation mark. It should be used in exceptional cases to draw attention to things that might be dangerous or ill-advised to do (or not do), or to urge caution about them.


NOTE: This template should be used only for alerts or warnings. Use Template:Instruction or Template:Advice for instruction sets or other essential/very important information that needs to be emphasized, but doesn't require a caution or warning about the consequences of non-adherence. For the current list of available templates, see Templates.


General usage:

{{Alert| Text to be displayed as an alert or warning }}


Example:

Typing this:

{{Alert|'''WARNING:''' Never connect the speaker out or preamp out directly to the sound card!}}


will produce this:

Warning icon WARNING: Never connect the speaker out or preamp out directly to the sound card!


Special cases:

If the text must contain the equals sign "=", use "1=" after the pipe symbol "|" thus:

{{Alert|1=Note that using the = sign will cause the code to fail!}}


If other essential symbols in the text still cause it to display incorrectly, try enclosing the text after the pipe inside <nowiki> </nowiki> tags. This solution would also work with the above example:

{{Alert|<nowiki>Note that using the = sign will cause the code to fail!</nowiki>}}


However, <nowiki> </nowiki> tags will not work if you need to use another template inside the Alert template, as they will prevent the other templates being parsed. In this case, the only solution is to precede the entire text string after the first pipe by 1=, like this:

{{Alert|1='''NOTE:''' Audacity cannot recognise ASIO drivers. See this {{external|1=[http://youtube.com/?video=dg435434df video]}}.}}


which produces:

Warning icon NOTE: Audacity cannot recognise ASIO drivers. See this video .

Note also that in this example the second template must itself contain the 1= prefix, as its URL contains an equals sign.



Ignore the following, it's only a representation of formatting and a parameter dummy.

Warning icon {{{1}}}