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
mNo edit summary
m (use anonymous parameters)
Line 1: Line 1:
<includeonly>{{#if:{{{file|}}}|
<includeonly>{{#if:{{{1|}}}|
{{#ifeq:
{{#ifeq:
   {{lc:{{#explode:{{{file}}}|.|-1}}}}|ogg|
   {{lc:{{#explode:{{{1}}}|.|-1}}}}|ogg|
   <span class="audio-button">[[Media:{{{file}}}|{{{caption|Play}}}]]</span>
   <span class="audio-button">[[Media:{{{1}}}|{{{caption|Play}}}]]</span>
   |{{#sub:{{file:{{{file}}}}}|7}}
   |{{#sub:{{file:{{{1}}}}}|7}}
}}
}}
}}</includeonly><noinclude>
}}</includeonly><noinclude>
Line 11: Line 11:
<pre><nowiki>
<pre><nowiki>
{{Audio
{{Audio
|file=filename without the File: prefix (e.g. BlazBlue Central Fiction Jubei Battle Voice VS Celica 001.ogg)
|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
|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}}
{{Audio|BlazBlue Central Fiction Jubei Battle Voice VS Celica 001.ogg|Caption}}
</nowiki></pre>
</nowiki></pre>


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


[[Category:Templates]]
[[Category:Templates]]
</noinclude>
</noinclude>

Revision as of 20:33, 21 March 2020

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

Usage

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

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

Play Play Play