Template:Media table: Difference between revisions
From the Super Mario Wiki, the Mario encyclopedia
Jump to navigationJump to search
m (Text replacement - "[[Wikipedia:" to "[[wikipedia:") |
mNo edit summary |
||
(17 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
<includeonly>{{#forargs:file|key|value|{{media table/row|type={{{type{{#var:key}}|{{#switch:{{lc:{{#sub:{{#var:value}}|-4}}}}|.ogv|webm=video}}}}}|file={{#var:value}}|title={{{title{{#var:key}}|}}}|description={{{description{{#var:key}}|}}}|length={{{length{{#var:key}}|}}}}}}} | <includeonly><div style="display:flow-root;margin-top:1em">{{#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}}|}}}|check={{{check{{#var:key}}|}}}}}}}</div><templatestyles src="Media table/styles.css"/> | ||
:<small>[[Help:Media]] • [[wikipedia:Help:Media (audio and video)|Having trouble playing?]]</small></includeonly><noinclude> | :<small>[[Help:Media]] • [[wikipedia:Help:Media (audio and video)|Having trouble playing?]]</small></includeonly><noinclude> | ||
{{media table | {{media table | ||
|file1=Example.ogv | |file1=Example.ogv | ||
|title1=Example | |title1=Example video | ||
|description1=Showing an example video file. | |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 audio file. | |description2=Showing an example audio file. | ||
|length2=0:03 | |length2=0:03 | ||
Line 15: | Line 15: | ||
This template is used for organizing media files on pages. The table above is produced by the following syntax: | This template is used for organizing media files on pages. The table above is produced by the following syntax: | ||
<pre>{{media table | <pre> | ||
{{media table | |||
|file1=Example.ogv | |file1=Example.ogv | ||
|title1=Example | |title1=Example video | ||
|description1=Showing an example video file. | |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 audio file. | |description2=Showing an example audio file. | ||
|length2=0:03 | |length2=0:03 | ||
}}</pre> | }} | ||
</pre> | |||
=== Parameters === | === Parameters === | ||
Line 33: | Line 35: | ||
*<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 after the title. | ||
*<code>lengthX</code> - The file duration, in M:SS format. | *<code>lengthX</code> - The file duration, in M:SS format. | ||
*<code>checkX</code> - Set to <tt>no</tt> to disable the 30-second length check ''for [[Help:Media|sound clips]]''. '''Never set this for copyrighted music!''' | |||
Note that for all the values, additional files can be added to the list by incrementing the parameter number. | Note that for all the values, additional files can be added to the list by incrementing the parameter number. | ||
[[Category:Structural templates]]</noinclude> | |||
[[Category: |
Latest revision as of 18:12, December 26, 2024
File info 0:12 |
File info 0:03 |
Usage
This template is used for organizing media files on pages. The table above is produced by the following syntax:
{{media table |file1=Example.ogv |title1=Example video |description1=Showing an example video file. |length1=0:12 |file2=Example.oga |title2=Example audio |description2=Showing an example audio file. |length2=0:03 }}
Parameters
The following parameters may be defined when using the template (replace X
with a number):
fileX
- The filename, excluding the "File:" prefix. So for the file at "File:Example.oga", this parameter would be defined as "Example.oga".titleX
- The title of the file that will be used in the table; automatically appears in bold.descriptionX
- A short description of the file that will appear after the title.lengthX
- The file duration, in M:SS format.checkX
- Set to no to disable the 30-second length check for sound clips. Never set this for copyrighted music!
Note that for all the values, additional files can be added to the list by incrementing the parameter number.