Template:Media table/row: Difference between revisions

From the Super Mario Wiki, the Mario encyclopedia
Jump to navigationJump to search
(Undo revision 2186800 by Wildgoosespeeder (talk))
mNo edit summary
Line 1: Line 1:
{{#if:{{{name|}}}|<table style="padding:4px;width:100%;border-collapse:collapse;border:1px solid black;border-top:2px solid black"><tr><td style="padding:3px 0 0 2px;">{{#ifeq:{{lc:{{{type}}}}}|video|[[File:Video.svg|25px|link=]]|[[File:Audio.png|link=|25px]]}} {{#ifeq:{{lc:{{{type}}}}}|video|'''[[:File:{{{name}}}.{{#switch:{{{caps|off}}}|=ogg|off=ogg|#default=OGG}}|{{{pipe|{{{name}}}}}}]]'''|'''{{{pipe|{{{name}}}}}}'''}} {{#if:{{{description|}}}|- {{{description}}}}}<center>{{#ifeq:{{lc:{{{type}}}}}|video||[[File:{{{name}}}.{{#switch:{{{caps|off}}}|=ogg|off=ogg|#default=OGG}}]]}}</center></td><td style="text-align:right;width:6%;padding-right:10px;"><small>{{{length|}}}</small><br><small>[[:File:{{{name}}}.{{#switch:{{{caps|off}}}|=ogg|off=ogg|#default=OGG}}|File info]]</small></td></tr></table><div style="display:none;">[[File:{{{name}}}.{{#switch:{{{caps|off}}}|=ogg|off=ogg|#default=OGG}}]]</div>}}<includeonly>[[Category:Pages with media files]]</includeonly><noinclude>==Usage==
{{#if:{{{name|}}}|<table style="padding:4px;width:100%;border-collapse:collapse;border:1px solid black;border-top:2px solid black"><tr><td style="padding:3px 0 0 2px;">[[File:Media.svg|link=|25px]] {{#ifeq:{{lc:{{{type}}}}}|video|'''[[:File:{{{name}}}.{{#switch:{{{caps|off}}}|=ogg|off=ogg|#default=OGG}}|{{{pipe|{{{name}}}}}}]]'''|'''{{{pipe|{{{name}}}}}}'''}} {{#if:{{{description|}}}|- {{{description}}}}}<center>{{#ifeq:{{lc:{{{type}}}}}|video||[[File:{{{name}}}.{{#switch:{{{caps|off}}}|=ogg|off=ogg|#default=OGG}}]]}}</center></td><td style="text-align:right;width:6%;padding-right:10px;"><small>{{{length|}}}</small><br><small>[[:File:{{{name}}}.{{#switch:{{{caps|off}}}|=ogg|off=ogg|#default=OGG}}|File info]]</small></td></tr></table><div style="display:none;">[[File:{{{name}}}.{{#switch:{{{caps|off}}}|=ogg|off=ogg|#default=OGG}}]]</div>}}<includeonly>[[Category:Pages with media files]]</includeonly><noinclude>==Usage==
The purpose of this template is to cleanly insert Audio/Video files into pages. The following parameters may be defined when using it.
The purpose of this template is to cleanly insert Audio/Video files into pages. The following parameters may be defined when using it.



Revision as of 04:58, May 3, 2017

Usage

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

  • name - 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".
  • type - Should be set to either "audio" or "video".
  • caps - 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.
  • pipe - 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", name would be defined "Example246", and pipe "Example". In cases where name and pipe would be set to identical values, only name needs to be used.
  • description - A short description of the file that will appear with it on the page.

At current, it supports only one file per template. Use {{media}} for multiple usage.

For OGG files. To use for OGA or OGV, see {{media/OGA}} and {{media/OGV}}.