Toggle menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Template:Audio: Difference between revisions

Template page
m (testing and tooltips)
m (remove tooltip but still include source)
Line 1: Line 1:
<includeonly>{{#if:{{{file|}}}|
<includeonly>{{#if:{{{file|}}}|
{{tt|
{{#ifeq:
  {{#ifeq:
  {{lc:{{#explode:{{{file}}}|.|-1}}}}|ogg|
    {{lc:{{#explode:{{{file}}}|.|-1}}}}|ogg|
  <span class="audio-button">[[Media:{{{file}}}|{{{caption|Play}}}]]</span>
    <span class="audio-button">[[Media:{{{file}}}|{{{caption|Play}}}]]</span>
  |{{#sub:{{file:{{{file}}}}}|7}}
    |{{#sub:{{file:{{{file}}}}}|7}}
}} ([[:File:{{{file|}}}|source]])
  }}|[[:File:{{{file|}}}]]|line=false}}
}}</includeonly><noinclude>
}}</includeonly><noinclude>
This template displays a play/pause button for ogg files, and a "Play" link for non-ogg audio files.
This template displays a play/pause button for ogg files, and a "Play" link for non-ogg audio files.

Revision as of 18:29, 15 March 2020

This template displays a play/pause button for ogg files, and a "Play" link for non-ogg audio files.

Usage

{{Audio
|file=filename without the File: prefix (e.g. BlazBlue Central Fiction Jubei Battle Voice VS Celica 001.ogg)
|caption=optional caption for non-ogg audio links. The link will display as "Play" by default
}}

{{Audio|file=BlazBlue Central Fiction Jubei Battle Voice VS Celica 001.ogg|caption=Caption}}

Play (source) Play (source) Play (source)