Difference between revisions of "Template:Audio/doc"

From blackwiki
Jump to navigation Jump to search
imported>MZMcBride
(rm spaces)
imported>Vanisaac
m (→‎See also: clean up per WP:CAT#T and WP:AWBREQ add template:Sandbox other)
 
(62 intermediate revisions by 51 users not shown)
Line 1: Line 1:
<includeonly>{{template doc page transcluded}}</includeonly><noinclude>{{template doc page viewed directly}}</noinclude>
+
{{Documentation subpage}}
<!-- EDIT TEMPLATE DOCUMENTATION BELOW THIS LINE -->
+
<!--PLEASE ADD CATEGORIES WHERE INDICATED AT THE BOTTOM OF THIS PAGE-->
== Purpose ==
+
{{for|instructions on inserting audio files|Wikipedia:Creation and usage of media files#Audio}}
This template links to an audio file for quick listening.  It is meant to be used inline with text, for pronunciations and the like.
+
=== 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. Please note that this just creates a link to the file and does not actually embed the file. If the file is Non-Free and only referenced via this template it is not in compliance with [[WP:NFCC#7|Wikipedia:Non-free content criteria § Policy #7]].
  
== Usage ==
+
=== Usage ===
<code><nowiki>{{Audio|name of sound file|text to use as link to soundfile}}</nowiki></code>
+
; Basic:
 +
<code><nowiki>{{Audio|name of sound file|text to use as link to soundfile|help=}}</nowiki></code>
  
Example:
+
; Simple
:<code><nowiki>'''Bordeaux''' ({{Audio|Fr-Bordeaux.ogg|pronunciation}}) is a [[Seaport|port]] city in...</nowiki></code>
+
: <code><nowiki>'''Alabama''' ({{Audio|en-us-Alabama.ogg|pronunciation}}) is a state located in...</nowiki></code>
gives this:
+
: '''Alabama''' ({{Audio|en-us-Alabama.ogg|pronunciation}}) is a state located in...
:'''Bordeaux''' ({{Audio|Fr-Bordeaux.ogg|pronunciation}}) is a [[Seaport|port]] city in...
+
; Help links
 +
Setting {{para|help|no}} disables the "help/info" links. If this is done the template {{tlx|inline audio}} ''must'' be shown on the page.
  
== Using on other wikis ==
+
: <code><nowiki>'''Alabama''' ({{Audio|en-us-Alabama.ogg|pronunciation of "Alabama"|help=no}})</nowiki></code>
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.'''
+
: → '''Alabama''' ({{Audio|en-us-Alabama.ogg|pronunciation|help=no}})
 +
: Todo: add {{tlx|inline audio}} to this page.
  
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. 
+
=== Microformat ===
 +
{{UF-audio}}
  
These CSS rules are in [[MediaWiki:Common.css]] (the part that starts with <code>.audiolink a {</code>).  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 ===
 +
{{Audio templates}}
  
== See also ==
+
<includeonly>{{Sandbox other|
* {{tl|Audio-nohelp}}, a variant of this template with no help links.
+
| <!-- PLEASE ADD CATEGORIES BELOW THIS LINE: -->
* {{tl|Audio-IPA}}, a variant of this template to be used with [[International Phonetic Alphabet|IPA]] notation.
+
[[Category:Audio templates]]
** {{tl|Audio-IPA-nohelp}}, a variant with no help links.
+
[[Category:Templates that add a tracking category]]
* {{tl|Spoken}}, which adds only the small icon with no links.
+
}}</includeonly>
* {{tl|Listen}}, which sets an audio clip off from the main text.
 
 
 
<includeonly>
 
<!-- ADD CATEGORIES BELOW THIS LINE -->
 
[[Category:Audio templates|{{PAGENAME}}]]
 
 
 
<!-- ADD INTERWIKIS BELOW THIS LINE -->
 
[[de:Vorlage:Audio]]
 
[[bg:Шаблон:Audio]]
 
[[es:Plantilla:Audio]]
 
[[eo:Ŝablono:Sondosiero]]
 
[[fa:الگو:صدا]]
 
[[it:Template:Audio]]
 
[[ko:틀:듣기]]
 
[[mk:Шаблон:Аудио]]
 
[[no:Mal:Audio]]
 
[[pl:Szablon:Audio]]
 
[[pt:Predefinição:Áudio]]
 
[[ru:Шаблон:Audio]]
 
[[rmy:Format:Shun]]
 
[[sl:Predloga:Avdio]]
 
[[sv:Mall:Audio]]
 
[[th:Template:เสียง]]
 
[[vi:Tiêu bản:Âm thanh]]
 
 
 
</includeonly>
 

Latest revision as of 23:23, 23 April 2020

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. Please note that this just creates a link to the file and does not actually embed the file. If the file is Non-Free and only referenced via this template it is not in compliance with Wikipedia:Non-free content criteria § Policy #7.

Usage

Basic

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

Simple
'''Alabama''' ({{Audio|en-us-Alabama.ogg|pronunciation}}) is a state located in...
Alabama (About this soundpronunciation ) is a state located in...
Help links

Setting |help=no disables the "help/info" links. If this is done the template {{inline audio}} must be shown on the page.

'''Alabama''' ({{Audio|en-us-Alabama.ogg|pronunciation of "Alabama"|help=no}})
Alabama (About this soundpronunciation)
Todo: add {{inline audio}} to this page.

Microformat

Template:UF-audio

See also