Template:Media table/row: Difference between revisions

From the Super Mario Wiki, the Mario encyclopedia
Jump to navigationJump to search
m (Robot: Automated text replacement (-media/OGA +media table/OGA))
mNo edit summary
 
(32 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<table style="padding:4px;width:100%;border-collapse:collapse;border:1px solid black;border-top:2px solid black"><tr><td>[[File:Media.svg|link=|25px]] '''{{#if:{{{pipe|}}}|{{{pipe}}}|{{{name}}}.{{#switch:{{{caps|off}}}|=ogg|off=ogg|#default=OGG}}}}''' {{#if:{{{description|}}}|- {{{description}}}}}<center>{{#ifeq:{{lc:{{{type}}}}}|video|[[Media:{{{name}}}.{{#switch:{{{caps|off}}}|=ogg|off=ogg|#default=OGG}}|Play file]]|[[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>{{media link|{{{name}}}.{{#switch:{{{caps|off}}}|=ogg|off=ogg|#default=OGG}}|File info}}</small></td></tr></table><includeonly>[[Category:Pages with media files]]</includeonly><noinclude>A Media template for .OGG files which are video and audio files. Please, edit only if you know the code.
<includeonly><table class="wikitable mediaRow {{#ifeq:{{{type}}}|video|videoRow|audioRow}}" style="width:100% !important"><tr><td class="fileMain">[[File:{{#ifeq:{{{type}}}|video|Video|Audio}}.svg|25px|link=]] '''{{#if:{{{title|}}}|{{{title}}}|{{#sub:{{{file}}}|0|{{#rpos:{{{file}}}|.}}}}}}''' {{#if:{{{description|}}}|- {{{description}}}}}<center>{{#ifeq:{{{type}}}|video|[[File:{{{file}}}|x75px|Play video]]|[[File:{{{file}}}|300px]]}}</center><td class="fileInfo" style="width:50px;text-align:right;padding-right:10px"><small>{{file link|{{{file}}}|File info}}<br>{{#if:{{{length|}}}|{{{length}}}|&#8203;}}</small></table></includeonly><noinclude>
== Usage ==
This is a subtemplate and it's not intended to be used directly. See {{tem|media table}} for instructions.


==Usage==
[[Category:Subtemplates]]</noinclude><includeonly>{{#ifeq:{{{type}}}|video|[[Category:Pages with video files]]|[[Category:Pages with audio files]]{{#if:{{NAMESPACE}}||{{#if:{{{length|}}}|{{#ifeq:{{#sub:{{{length}}}|0|1}}|0|{{#ifexpr:{{#sub:{{{length}}}|-2}} > 30|[[Category:Articles with audio files over 30 seconds]]}}|[[Category:Articles with audio files over 30 seconds]]}}}}}}}}</includeonly>
[[File:Media.svg|thumb|right]]
The purpose of this template is to cleanly insert Audio/Video files into pages. The following parameters may be defined when using it.
 
*<code>type</code> - Should be set to either "audio" or "video".
*<code>name</code> - The name that the file is uploaded under. It should not include the "File:" prefix, nor the file extension (.ogg) So for the file at "File:Example.ogg", this parameter would be defined as "Example".
*<code>pipe</code> - 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", <code>name</code> would be defined "Example246", and <code>pipe</code> "Example". In cases where <code>name</code> and <code>pipe</code> would be set to identical values, only <code>name</code> needs to be used.
*<code>description</code> - A short description of the file that will appear with it on the page.
*<code>length</code> - HH:MM:SS format. Omit zeros please.
*<code>caps</code> - 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.
 
At current, it supports only one file per template. It is recommended to not use this template directly. Use {{tem|media}} instead because it will call this template.
 
For OGG files. To use for OGA or OGV, see {{tem|media table/OGA}} and {{tem|media table/OGV}}.[[Category:Media templates]]</noinclude>

Latest revision as of 16:11, June 30, 2024

Usage

This is a subtemplate and it's not intended to be used directly. See {{media table}} for instructions.