Template:Media

From Wikisource
Jump to: navigation, search

Speaker Icon.svg

Documentation icon Template documentation[view] [edit] [history] [purge]


This template is a typing aid that adds multimedia icons to any page. It is intended to identify which works have multimedia elements attached to them (such as audio files, spoken word versions, film clips and music). The template has two uses, both to create the icons and to provide a key for those icons.

Usage[edit]

{{Media
 | type     = 
 | multi    = 
 <!--The following only apply if "multi" is selected-->
 | audio    = 
 | music    = 
 | video    = 
 <!--The following is only for use to create a key-->
 | key      = 
 | nobreak  = 
 | parts    = 
 | category = 
}}

If no parameters are set, the template will display the default "speaker" icon as used with audio files and spoken word versions of texts.

This template has two fuctions: Icon or Key.

Icon only[edit]

Icon only is the default setting of this template. Size can be adjusted (in pixels). Default size is 20px in the Author: namespace and 15px in the Main namespace. To adjust the size, use the number of pixels with no named parameter.

Multi can be used to display multiple icons. This overrides the type.

Key text[edit]

By setting the key parameter to yes, the template will display text to explain the icon. This will override the creation of icons. When using this fuction, the template should be placed in the appropriate page header.

The key will automatically include an opening line break, which is often but not always useful for displaying correctly. This line break can be deactivated by setting the nobreak parameter to yes.

The text of the key depends on the namespace combined with the type and parts parameters.

In the Author and Wikisource namespaces, this template inserts one of the following icons and text:

The icon Speaker Icon.svg identifies that the work includes a spoken word version.

The icon Musical note nicu bucule 01.svg identifies that the work includes a musical version.

The icon Film icon.svg identifies that the work includes a video version.

In the main namespace (and any other namespace not mentioned), this template instead inserts one of the following icons and text:

Speaker Icon.svg one or more chapters are available in a spoken word format.

Musical note nicu bucule 01.svg one or more chapters are available in a musical format.

Film icon.svg one or more chapters are available in a video format.

The parts parameter can override the use of the word "chapters" in the text. This can be used in situations where the work is subdivided in a different manner. Possibilities include "parts" or "sections."

Note #1: When used as a key, this template adds Category:Spoken works (audio, including music) or Category:Works with videos (video). To omit addition of the Category add the code {{Media| category = }}

Placement[edit]

Icon[edit]

On author pages, place the icon after the name of the text that has multimedia elements.

If a single chapter or other subsection of a work has multimedia elements, this template can be placed on the contents page of the work to indicate which contain the multimedia element(s). In these cases, place the icon after the name of the chapter or subsection (in this situation, the size should be 15px.)

Key[edit]

The key should be placed in the page header. This appropriate place depends on the namespace:

Namespace Placement
Author In the {{Author}} Description field
Main In the {{Header}} Notes field
Wikisource In the {{Process header}} Notes field

Multimedia[edit]

This template displays icons for three types of media, as shown in this table. Any one of the keywords can be used with type to set the appropriate icon. To set more than one icon, set mutli to "y" and set any of audio, music and video to "y" to display the icons.

Media type Keyword(s) Icon
Spoken word version (audiobook) audio, spoken, speaker (default) Speaker Icon.svg
Music music, song, note Musical note nicu bucule 01.svg
Video video, film Film icon.svg

Note: mutli does not currently work with key

Speaker & Spoken[edit]

The previous version of this template was {{Speaker}}, which originally displayed only the speaker icon. {{Speaker}} is still in use and can still be used, as it redirects to this template.

The template {{Spoken}}, which originally provided a key for the speaker icon, has also been merged into this template. {{Spoken}} is still in use and can still be used, as it redirects to this template.

Examples[edit]

Basic icon examples[edit]

{{Media}}

Speaker Icon.svg

{{Media|15}}

Speaker Icon.svg

{{Media|type=music}}

Musical note nicu bucule 01.svg

{{Media|type=music|30}}

Musical note nicu bucule 01.svg

{{Media|type=film}}

Film icon.svg

{{Media|15|type=note}}

Musical note nicu bucule 01.svg

 {{media|type = spoken}}
Speaker Icon.svg
 {{media|15|type = spoken}}
Speaker Icon.svg
{{Speaker|type=film|15}}

Film icon.svg

Complicated icon examples[edit]

{{Media
 | multi = y
 | audio = 
 | music = y
 | video = y
}}

Musical note nicu bucule 01.svgFilm icon.svg

{{Media
 | multi = y
 | audio = y
 | video = y
}}

Speaker Icon.svgFilm icon.svg

{{Media
 | multi = y
 | audio = y
 | music = y
 | video = y
 | 15
}}

Speaker Icon.svgMusical note nicu bucule 01.svgFilm icon.svg

Key examples[edit]

{{Media|key=y}}


Speaker Icon.svg one or more chapters are available in a spoken word format.

{{Media
 | key  = y
 | type = music
}}


Musical note nicu bucule 01.svg one or more chapters are available in a musical format.

{{Media
 | key  = y
 | type = film
}}


Film icon.svg one or more chapters are available in a video format.

{{Media|key=y|nobreak=y}}

Speaker Icon.svg one or more chapters are available in a spoken word format.

{{Media
 | key   = y
 | parts = sections
}}


Speaker Icon.svg one or more sections are available in a spoken word format.

Related templates[edit]

  • {{Listen}} - to add audio files to a text
  • {{Watch}} - to add video files to a text