Template:Listen: Difference between revisions

From Pikipedia, the Pikmin wiki
Jump to navigation Jump to search
m (11 revisions: help/template)
(New documentation style.)
Line 1: Line 1:
<div class="medialist listenlist" style="width:{{{width|200}}}px">
<div class="medialist listenlist" style="width:{{{width|200}}}px">
{{#if:{{{title}}}|'''[[:Image:{{{filename}}}|{{{title}}}]]'''}}
{{#if:{{{title}}}|'''[[:File:{{{filename}}}|{{{title}}}]]'''}}
{{#ifeq:{{{ogg}}}|no||[[Image:{{{filename}}}|noicon]]}}
{{#ifeq:{{{ogg}}}|no||[[File:{{{filename}}}|noicon]]}}
<div style="font-size:8pt;text-align:left;padding:4pt;line-height:1.25em">{{{description|}}}</div>
<div style="font-size:8pt;text-align:left;padding:4pt;line-height:1.25em">{{{description|}}}</div>
{{#ifeq:{{{helpnote}}}|no||<p style="text-align:right;font-size:10pt;line-height:1.25em">''Problems listening to the file? See [[Wikipedia:Media help|media help]].''</p>}}
{{#ifeq:{{{helpnote}}}|no||<p style="text-align:right;font-size:10pt;line-height:1.25em">''Problems listening to the file? See [[Wikipedia:Media help|media help]].''</p>}}
</div><noinclude>[[Category:Media templates|{{PAGENAME}}]]
</div><noinclude>


==Use==
==Info==
<pre><nowiki>{{listen       *optional field
Use this template to present an audio file for the reader to hear.
*|title=title shown
 
|filename=filename without namespace
==Parameters==
*|ogg='yes' or 'no'
{| class = "wikitable"
*|description=description
! Parameter || Mandatory || Default || Detailed description
*|helpnote='yes' or 'no'
|-
}}</nowiki></pre>
! filename
| '''Yes''' ||  || File name, without namespace, with extension.
|-
! title
| No ||  || Title to show for the file.
|-
! ogg
| No ||  || If this is an OGG file, give this the value "yes". Otherwise, "no".
|-
! description
| No ||  || Description for the file.
|-
! helpnote
| No ||  || Whether or not to display the help note ("yes" or "no").
|}
 
==Template==
<pre>
{{listen
|filename    =
|title      =
|ogg        =  
|description =  
|helpnote    =
}}
</pre>
 
==Examples==
{| class = "wikitable"
! Code || Result
|-
| <pre>{{listen
|filename=Hoard.ogg
|title=Treasure Hoard music
|ogg=yes
|description=Music that plays on the Treasure Hoard.
|helpnote=yes}}</pre>
| {{listen
|filename=Hoard.ogg
|title=Treasure Hoard
|ogg=yes
|description=Music that plays on the Treasure Hoard.
|helpnote=yes}}
|}
 
{{todo|This template probably needs an update...}}
 
[[Category:Media templates]]
</noinclude>
</noinclude>

Revision as of 09:47, October 28, 2014

[[:File:{{{filename}}}|{{{title}}}]] [[File:{{{filename}}}|noicon]]

Problems listening to the file? See media help.

Info

Use this template to present an audio file for the reader to hear.

Parameters

Parameter Mandatory Default Detailed description
filename Yes File name, without namespace, with extension.
title No Title to show for the file.
ogg No If this is an OGG file, give this the value "yes". Otherwise, "no".
description No Description for the file.
helpnote No Whether or not to display the help note ("yes" or "no").

Template

{{listen
|filename    = 
|title       = 
|ogg         = 
|description = 
|helpnote    = 
}}

Examples

Code Result
{{listen
|filename=Hoard.ogg
|title=Treasure Hoard music
|ogg=yes
|description=Music that plays on the Treasure Hoard.
|helpnote=yes}}

Treasure Hoard

Music that plays on the Treasure Hoard.

Problems listening to the file? See media help.


To do: This template probably needs an update...
Care to do so?