Difference between revisions of "Template:Hint"

From Audacity Wiki
Jump to: navigation, search
(Does not work - continue to ignore the experiments for now)
m (Add advice to edit the 'note' class rather than editing this template directly)
 
(11 intermediate revisions by 4 users not shown)
Line 1: Line 1:
<noinclude>{{UserWip}}
+
<noinclude>__NOTOC__{{intro|The '''''Hint'' Template''' formats text inside a standard pale green box. It should be used sparingly for additional, secondary information such as "hints" that may not be relevant or essential to all users. A good use is for pointing out something that only applies in a particular case. In some cases, it may be used to break up a long instruction set formatted with [[Template:Instruction]], or to break up plain text in a long article.|The word and colon '''&quot;HINT:&quot;''' (in bold) can be typed if desired as the first input, according to the context. If '''HINT:''' is included, it's suggested not to use it more than twice on the same page.}}
__NOTOC__
+
'''''NOTE:''''' This template should be used '''only for ''hints''''' and other secondary information. Use [[Template:Instruction]] or [[Template:Advice]] for instruction sets or other essential/very important information that needs to be emphasized. For the current list of available templates, see [[:Category:Templates]].  
{{intro|The '''''Hint'' Template''' formats text, intended as additional hints, inside a standard pale green box.|}}
+
{{Advice|To change the appearance of this template and also the '''[[Template:Note|Note Template]]''', edit the '''note''' class in [[MediaWiki:Common.css]]}}
 
 
 
 
'''Experiment with prefilled HINT and dual colours'''
 
 
 
I still don't think the colour for the main hint text after '''HINT:''' is quite right, though I agree black does not work well. I think this works better for me (any really dark green or dark slate grey type of colour seems an improvement)
 
 
 
{{Hint|1=You must enable all the recording switches when monitoring the input. Go to {{external|1=[http://youtube.com/results?search_query=audacity Search Youtube for Audacity]}} for more details.}}
 
 
 
<font color= "blue"> Ahem, well the pre-filling does not work and seems to cancel the following text.. could this and the dual colours be made to work? - Gale </font> 
 
 
 
 
 
'''Purpose'''
 
 
 
* This template formats text inside a standardised "hint" box with pale green background. The text should be reasonably concise (preferably one or two sentences) not to dominate the main contents of the article (should a longer hint be needed, you may consider to make it as a separate section or even a separate page). If a second paragraph is needed, you can use ENTER on the keyboard to create one, just as in normal editing.
 
  
 +
'''Usage of ''Hint'' Template'''
  
'''Usage of ''Hint'' Template'''
+
The text should be reasonably concise (preferably one or two sentences) so as not to dominate the main contents of the article. Should a longer hint be needed, consider making it a separate section, or if necessary a separate page linked to on the current page. If a second paragraph is needed in the hint, you can use ENTER on the keyboard to create one, just as in normal editing. 
  
  
Line 30: Line 17:
 
''Typing this:''
 
''Typing this:''
  
{{code|<nowiki>{{Hint|'''HINT:''' Check out [[Templates]] for more information about the intended use of our templates.}}</nowiki>}}   
+
{{code|<nowiki>{{Hint|'''HINT:''' If you don't see any input, make sure you have plugged in the microphone correctly.}}</nowiki>}}   
  
  
 
''will produce this:''
 
''will produce this:''
{{Hint|'''HINT:''' Check out [[Templates]] for more information about the intended use of our templates.}}  
+
{{Hint|'''HINT:''' If you don't see any input, make sure you have plugged in the microphone correctly.}}  
  
  
 
'''Special cases:'''
 
'''Special cases:'''
  
If the text must contain the equals sign "=", then the text after the pipe can be enclosed inside {{shortcut|<nowiki> <nowiki> </nowiki> </nowiki>}} tags:
+
If the text must contain the equals sign "=", use '''&quot;1=&quot;''' after the pipe symbol "|" thus:
  
{{code|<nowiki>{{Hint|<nowiki>This page explains why "2 + 2 = 4" is correct.</nowiki></nowiki><nowiki></nowiki><nowiki>}}</nowiki>}}
+
{{code|<nowiki>{{Hint|1=The above also explains why 2 + 2 = 4.}}</nowiki>}}
  
  
Similarly, if other essential symbols in the text cause the text to display incorrectly, try enclosing the text inside {{shortcut|<nowiki> <nowiki> </nowiki> </nowiki>}} tags.  
+
If other essential symbols in the text still cause it to display incorrectly, try enclosing the text after the pipe inside '''<nowiki> <nowiki> </nowiki> </nowiki>''' tags. This solution would also work with the above example:
  
 +
{{code|<nowiki>{{Hint|<nowiki>The above also explains why 2 + 2 = 4.</nowiki></nowiki><nowiki></nowiki><nowiki>}}</nowiki>}}
  
If the text must make use of other templates, however, the entire text string must be preceded by {{shortcut|1=1=}}, like this:
+
 
 +
However, '''<nowiki> <nowiki> </nowiki> </nowiki>''' tags will not work if you need to use another template inside the '''''Hint''''' 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:
  
 
{{code|<nowiki>{{Hint|1='''HINT:''' {{external|1=[http://youtube.com/results?search_query=audacity Search Youtube for Audacity]}}.}}</nowiki>}}
 
{{code|<nowiki>{{Hint|1='''HINT:''' {{external|1=[http://youtube.com/results?search_query=audacity Search Youtube for Audacity]}}.}}</nowiki>}}
  
  
Which produces:
+
which produces:
 
{{Hint|1='''HINT:''' {{external|1=[http://youtube.com/results?search_query=audacity Search Youtube for Audacity]}}.}}
 
{{Hint|1='''HINT:''' {{external|1=[http://youtube.com/results?search_query=audacity Search Youtube for Audacity]}}.}}
  
In this example:
+
 
* {{shortcut|&lt;nowiki&gt;&lt;/nowiki&gt;}} can not be used, as it will prevent parsing of the inner template call.
+
Note also that in this example the second template must itself contain the '''1=''' prefix, as its URL contains an equals sign.
* The inner template call must also contain the {{shortcut|1=1=}} prefix, as its parameter contains an equals sign.
+
 
  
 
[[Category:Templates]]
 
[[Category:Templates]]
  
 
----
 
----
 +
  
 
''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:#ECFCF4; color:#254117; border:1px solid #999999; font-size:88%" width=90% align="center" cellpadding="5px"
+
<div class="note">{{{1}}}</div>
|- 
 
|<span style= "color:#336633">'''HINT:'''&nbsp;</span>
 
|}
 

Latest revision as of 15:42, 2 May 2012

The Hint Template formats text inside a standard pale green box. It should be used sparingly for additional, secondary information such as "hints" that may not be relevant or essential to all users. A good use is for pointing out something that only applies in a particular case. In some cases, it may be used to break up a long instruction set formatted with Template:Instruction, or to break up plain text in a long article.
The word and colon "HINT:" (in bold) can be typed if desired as the first input, according to the context. If HINT: is included, it's suggested not to use it more than twice on the same page.

NOTE: This template should be used only for hints and other secondary information. Use Template:Instruction or Template:Advice for instruction sets or other essential/very important information that needs to be emphasized. For the current list of available templates, see Category:Templates.

Warning icon To change the appearance of this template and also the Note Template, edit the note class in MediaWiki:Common.css

Usage of Hint Template

The text should be reasonably concise (preferably one or two sentences) so as not to dominate the main contents of the article. Should a longer hint be needed, consider making it a separate section, or if necessary a separate page linked to on the current page. If a second paragraph is needed in the hint, you can use ENTER on the keyboard to create one, just as in normal editing.


General usage:

{{Hint| Text to be displayed as a hint }}


Example:

Typing this:

{{Hint|'''HINT:''' If you don't see any input, make sure you have plugged in the microphone correctly.}}


will produce this:

HINT: If you don't see any input, make sure you have plugged in the microphone correctly.


Special cases:

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

{{Hint|1=The above also explains why 2 + 2 = 4.}}


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:

{{Hint|<nowiki>The above also explains why 2 + 2 = 4.</nowiki>}}


However, <nowiki> </nowiki> tags will not work if you need to use another template inside the Hint 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:

{{Hint|1='''HINT:''' {{external|1=[http://youtube.com/results?search_query=audacity Search Youtube for Audacity]}}.}}


which produces:


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.

{{{1}}}