Difference between revisions of "Template:Audio/doc"

From blackwiki
Jump to navigation Jump to search
imported>Datumizer
imported>Datumizer
Line 38: Line 38:
 
* {{tiw|Spoken}}, which adds only the small icon with no links.
 
* {{tiw|Spoken}}, which adds only the small icon with no links.
 
* {{tiw|Listen}}, which sets an audio clip off from the main text.
 
* {{tiw|Listen}}, which sets an audio clip off from the main text.
* {{tiw|Audio-sspan}}, puts the text description and media link into two spans that are floated left and right, respectively. Useful within table cells.
+
* {{tiw|Audio-sspan}}, puts a text description and the media link into two separate spans that are floated left and right, respectively. Useful within table cells.
  
 
<includeonly>
 
<includeonly>

Revision as of 01:13, 16 August 2008

Purpose

This template links to an audio file for quick listening. It is meant to be used inline with text, for pronunciations and the like.

Usage

{{Audio|name of sound file|text to use as link to soundfile}}

Example:

'''Bordeaux''' ({{Audio|Fr-Bordeaux.ogg|pronunciation}}) is a [[Seaport|port]] city in...

gives this:

Bordeaux (Audio file "Fr-Bordeaux.ogg" not found) is a port city in...

Note that a printout of the page will remove the "help·info" bit and give:

Bordeaux (pronunciation ) is a port city in...

Using on other wikis

This is one of several templates that use CSS to format the template instead of containing all the formatting inline. It will not work on another wiki unless you copy both the template and the CSS rules.

This particular template depends on the "audiolink" css class to add the loudspeaker icon as a background image for the link, which allows it to be clicked and go to the same link destination instead of the image's description page.

These CSS rules are in MediaWiki:Common.css (the part that starts with .audiolink a {). You will need to get an administrator on your local wiki to add the rules to your site's CSS. (Likewise, tweaking the size and placement of the icon is done by changing the CSS; not the template itself.)

See also