Template:Media table: Difference between revisions

From the Super Mario Wiki, the Mario encyclopedia
Jump to navigationJump to search
m (I see why HTML comment tags...)
No edit summary
Line 29: Line 29:
-->{{#if:{{{name29|}}}|{{Media/{{#switch:{{{type29}}}|video=OGV|Video=OGV|audio=OGA|Audio=OGA|#default=row}}|type={{{type29|}}}|name={{{name29|}}}|pipe={{{pipe29|}}}|description={{{description29|}}}|caps={{{caps29|}}}}}|}}<!--
-->{{#if:{{{name29|}}}|{{Media/{{#switch:{{{type29}}}|video=OGV|Video=OGV|audio=OGA|Audio=OGA|#default=row}}|type={{{type29|}}}|name={{{name29|}}}|pipe={{{pipe29|}}}|description={{{description29|}}}|caps={{{caps29|}}}}}|}}<!--
-->{{#if:{{{name30|}}}|{{Media/{{#switch:{{{type30}}}|video=OGV|Video=OGV|audio=OGA|Audio=OGA|#default=row}}|type={{{type30|}}}|name={{{name30|}}}|pipe={{{pipe30|}}}|description={{{description30|}}}|caps={{{caps30|}}}}}|}}
-->{{#if:{{{name30|}}}|{{Media/{{#switch:{{{type30}}}|video=OGV|Video=OGV|audio=OGA|Audio=OGA|#default=row}}|type={{{type30|}}}|name={{{name30|}}}|pipe={{{pipe30|}}}|description={{{description30|}}}|caps={{{caps30|}}}}}|}}
:<small>[[wikipedia:Wikipedia:Media help|Having trouble playing?]]</small></includeonly><noinclude>
:<small>[[wikipedia:Wikipedia:Media help|Having trouble playing?]]</small></includeonly><noinclude>Can now support 1-30 files.
Can now support 1-30 files.


==Usage==
==Usage==
Line 44: Line 43:
}}</nowiki>
}}</nowiki>
</pre>
</pre>
Note that for all the values, additional files can be added to the list by incrementing the number in the parameter. Up to thirty files can be included in one template.[[Category:Media templates|{{PAGENAME}}]]</noinclude>
Note that for all the values, additional files can be added to the list by incrementing the number in the parameter. Up to thirty files can be included in one template.
 
==Code documentation==
Calls {{tem|media/row}}, {{tem|media/OGV}}, and {{tem|media/OGA}} with a [[mediawiki.org:Help:Extension:ParserFunctions##switch|switch]].
[[Category:Media templates|{{PAGENAME}}]]</noinclude>

Revision as of 03:08, May 3, 2017

Can now support 1-30 files.

Usage

The purpose of this template is to cleanly insert Audio and Video files into pages. The following parameters may be defined when using it.

{{Media
|type1=Should be set to either "audio" or "video". This parameter controls the icon displayed next to the file.
|name1=The name that the file is uploaded under. It should not include the the "File:" prefix, nor the file extension (.ogg) So for the file at "File:Example.ogg", this parameter would be defined as "Example".
|pipe1=This should be the file's name as it will appear on the page. For instance, if a file is uploaded at "File:Example246.ogg", but it needs to appear on the page as simply "Example", name1 would be defined "Example246", and pipe1 "Example". In cases where name1 and pipe1 would be set to identical values, only name1 needs to be used.
|description1=A short description of the file that will appear with it on the page.
|caps1=If the file extension is written in all caps (.OGG), this should be set to "on". If it is written in lowercase (.ogg), 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. Up to thirty files can be included in one template.

Code documentation

Calls {{media/row}}, {{media/OGV}}, and {{media/OGA}} with a switch.