Template:Media table: Difference between revisions
From the Super Mario Wiki, the Mario encyclopedia
Jump to navigationJump to search
No edit summary |
m (Text replacement - "\[\[Category:([^\]|]+)\|{{PAGENAME}}\]\]" to "Category:$1") |
||
Line 43: | Line 43: | ||
Calls {{tem|media table/OGA}} for audio files and {{tem|media table/OGV}} for video files with a [[mww:Help:Extension:ParserFunctions##switch|switch]] statement. | Calls {{tem|media table/OGA}} for audio files and {{tem|media table/OGV}} for video files with a [[mww:Help:Extension:ParserFunctions##switch|switch]] statement. | ||
[[Category:Media templates | [[Category:Media templates]]</noinclude> |
Revision as of 01:58, February 10, 2021
Template:Media table/OGVTemplate:Media table/OGA
Usage
The code below produces the table above.
{{media table |type1=video |name1=Example |pipe1=Example Video |description1=Showing an example. |length1=0:12 |type2=audio |name2=Example |pipe2=Example Audio |description2=Showing an example. |length2=0:12 }}
The purpose of this template is to cleanly insert audio and video files into pages. The following parameters may be defined when using it. Replace X
with a number.
typeX
- Can be set to either "audio" or "video". This parameter controls the icon displayed next to the file and how to handle the linked media.nameX
- The name that the file is uploaded under. It should omit the "File:" prefix and file extension. So for the file at "File:Example.ogv", this parameter would be defined as "Example".formatX
- File extension for the given file, with the default being "oga" fortype=audio
and "ogv" fortype=video
if none is provided.pipeX
- This should be the file's name as it will appear on the page. For instance, if a file is uploaded at "File:Example246.ogv", but it needs to appear on the page as simply "Example",name
would be defined "Example246", andpipe
"Example". In cases wherename
andpipe
would be set to identical values, onlyname
needs to be used.descriptionX
- A short description of the file that will appear with it on the page.lengthX
- HH:MM:SS format. Omit zeros please.capsX
- If the file extension is written in all caps, this should be set to "on". If it is written in lowercase, it should be either left blank or set to "off". Note that a file extension containing a mix of capitals and lowercase is incompatible with this template.
Note that for all the values, additional files can be added to the list by incrementing the number in the parameter.
Code documentation
Calls {{media table/OGA}} for audio files and {{media table/OGV}} for video files with a switch statement.