Template:Listen/doc

From MicroWiki, the free micronational encyclopædia
Jump to navigation Jump to search

This template allows audio files to be embedded in articles. It should be used for audio files that are set off from the text, like music clips or sound recordings.

Usage

Simple

In its most simple form, the template takes the following parameters:

{{Listen
 |filename     = 
 |title        = 
 |description  = 
}}
  • filename (Required) – the pagename of the media file, without the File: (formerly Image:) prefix
  • title (Required) – the title of the audio file, to be displayed
  • description – a description of the audio file
Example
{{Listen
 |filename     = Rule Lifre (Instrumental).ogg
 |title        = Rule Lifre (Instrumental)
 |description  = An instrumental version of Rule Lifre taken from a record
}}

Multiple files

Additional files can be embedded in an article with one template by appending a number to each parameter. Up to five files can be included.

{{Listen
 |filename     = 
 |title        = 
 |description  = 
 |filename2    = 
 |title2       = 
 |description2 = 
 |filename3    = 
 |title3       = 
 |description3 = 
}}
  • filename (Required) – the pagename of the media file, without the File: (formerly Image:) prefix
  • title (Required) – the title of the audio file, to be displayed
  • description – a description of the audio file
Example
{{Listen
 |filename     = Rule Lifre (Instrumental).ogg
 |title        = Rule Lifre (Instrumental)
 |description  = An instrumental version of Rule Lifre taken from a record
 |filename2    = Anthem of Pakistan (instrumental).ogg
 |title2       = Anthem of Pakistan instrumental version
 |description2 = Anthem of [[w:Pakistan|Pakistan]] instrumental version featuring brass sections
 |filename3    = Bandiera Rossa (Anthem of LPRoR).ogg
 |title3       = Anthem of LPRoR
 |description3 = The Anthem of the LPRoR, Bandiera Rossa
 |play3        = no
}}

Style parameters

The template also takes a number of style parameters to control its appearance:

  • type – can be used to alter the image displayed at the left depending on the type of audio content being embedded. Acceptable values are sound and music (default)
  • header – can be used to add a header to the box.
  • help – if set |help=no, suppresses the help text that normally appears at the bottom of the box. Only do this if there are other audio files on the page which do have the help link, it must be provided on at least the first file on the article.
  • pos – by default the box floats to the right side of the screen. Setting this to left will cause the box to instead float on the left-hand side.
  • style – can be used to pass specific style instructions to the box.
  • play# – some media files cannot be displayed inline; if this is the case set |play=no to prevent the broken inline link from displaying.
  • plain – if set |plain=yes, removes most of the ornamentation (table border, image, and help links) to give a minimalist version.
Example
{{Listen
 |filename     = Rule Lifre (Instrumental).ogg
 |title        = Anthem of Lifre
 |description  = The National Anthem of the [[Empire of Lifréia]]
 |type         = sound
 |pos          = left
 |header       = Recordings of this phrase:
}}