42,399
edits
No edit summary |
mNo edit summary |
||
(14 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
<includeonly>{{#forargs: | <includeonly>{{#forargs:file|key|value|{{media table/row|type={{{type{{#var:key}}|{{#switch:{{lc:{{#sub:{{#var:value}}|-4}}}}|.ogv|.mp4|.mpg|mpeg|webm=video}}}}}|file={{#var:value}}|title={{{title{{#var:key}}|}}}|description={{{description{{#var:key}}|}}}|length={{{length{{#var:key}}|}}}}}}} | ||
:<small>[[Help:Media]] • [[ | :<small>[[Help:Media]] • [[wikipedia:Help:Media (audio and video)|Having trouble playing?]]</small></includeonly><noinclude> | ||
{{media table | |||
|file1=Example.ogv | |file1=Example.ogv | ||
|title1=Example | |title1=Example video | ||
|description1=Showing an example. | |description1=Showing an example video file. | ||
|length1=0:12 | |length1=0:12 | ||
|file2=Example.oga | |file2=Example.oga | ||
|title2=Example | |title2=Example audio | ||
|description2=Showing an example. | |description2=Showing an example audio file. | ||
|length2=0: | |length2=0:03 | ||
}} | }} | ||
==Usage== | == Usage == | ||
The | This template is used for organizing media files on pages. The table above is produced by the following syntax: | ||
<pre> | |||
<pre> | |||
{{media table | |||
|file1=Example.ogv | |file1=Example.ogv | ||
|title1=Example | |title1=Example video | ||
|description1=Showing an example. | |description1=Showing an example video file. | ||
|length1=0:12 | |length1=0:12 | ||
|file2=Example.oga | |file2=Example.oga | ||
|title2=Example | |title2=Example audio | ||
|description2=Showing an example. | |description2=Showing an example audio file. | ||
|length2=0: | |length2=0:03 | ||
}} | }} | ||
</pre> | |||
=== Parameters === | |||
The following parameters may be defined when using the template (replace <code>X</code> with a number): | |||
*<code>fileX</code> - The filename, excluding the "File:" prefix. So for the file at "File:Example.oga", this parameter would be defined as "Example.oga". | |||
*<code>fileX</code> - The filename | *<code>titleX</code> - The title of the file that will be used in the table; automatically appears in bold. | ||
*<code>titleX</code> - The title | *<code>descriptionX</code> - A short description of the file that will appear after the title. | ||
*<code>descriptionX</code> - A short description of the file that will appear | *<code>lengthX</code> - The file duration, in M:SS format. | ||
*<code>lengthX</code> - | |||
Note that for all the values, additional files can be added to the list by incrementing the number | Note that for all the values, additional files can be added to the list by incrementing the parameter number. | ||
== | == Sub-template == | ||
*[[Template:Media table/row]] | |||
[[Category:Media templates]]</noinclude> | [[Category:Media templates]]</noinclude> |