Template:YouTube: Difference between revisions
Jump to navigation
Jump to search
Created page with "<includeonly><center><!-- -->{{#if:{{{id|}}}|{{#ev:youtube|{{{id}}}|dimensions={{{width|240}}}x{{{height|185}}|inline|<center>{{{description}}}</center>|urlArgs=start={{{t}}}}}}} <!-- -->{{#if:{{{id2|}}}|{{#ev:youtube|{{{id2}}}|dimensions={{{width|240}}}x{{{height|185}}|inline|<center>{{{description2}}}</center>|urlArgs=start={{{t2}}}}}}} <!-- -->{{#if:{{{id3|}}}|{{#ev:youtube|{{{id3}}}|dimensions={{{width|240}}}x{{{height|185}}|inline|<center>{{{description3}}}</center>..."
No edit summary |
imported>Hb1290 (Created page with "<includeonly><center><!-- -->{{#if:{{{id|}}}|{{#ev:youtube|{{{id}}}|dimensions={{{width|240}}}x{{{height|185}}|inline|<center>{{{description}}}</center>|urlArgs=start={{{t}}}}}}} <!-- -->{{#if:{{{id2|}}}|{{#ev:youtube|{{{id2}}}|dimensions={{{width|240}}}x{{{height|185}}|inline|<center>{{{description2}}}</center>|urlArgs=start={{{t2}}}}}}} <!-- -->{{#if:{{{id3|}}}|{{#ev:youtube|{{{id3}}}|dimensions={{{width|240}}}x{{{height|185}}|inline|<center>{{{description3}}}</center>...") |
||
Line 1: | Line 1: | ||
<center | <includeonly><center><!-- | ||
-->{{#if:{{{id|}}}|{{# | -->{{#if:{{{id|}}}|{{#ev:youtube|{{{id}}}|dimensions={{{width|240}}}x{{{height|185}}|inline|<center>{{{description}}}</center>|urlArgs=start={{{t}}}}}}} <!-- | ||
-->{{#if:{{{id2|}}}|{{#ev:youtube|{{{id2}}}|dimensions={{{width|240}}}x{{{height|185}}|inline|<center>{{{description2}}}</center>|urlArgs=start={{{t2}}}}}}} <!-- | |||
-->{{#if:{{{ | -->{{#if:{{{id3|}}}|{{#ev:youtube|{{{id3}}}|dimensions={{{width|240}}}x{{{height|185}}|inline|<center>{{{description3}}}</center>|urlArgs=start={{{t3}}}}}}} <!-- | ||
-->{{#if:{{{id4|}}}|{{#ev:youtube|{{{id4}}}|dimensions={{{width|240}}}x{{{height|185}}|inline|<center>{{{description4}}}</center>|urlArgs=start={{{t4}}}}}}} <!-- | |||
-->{{#if:{{{ | -->{{#if:{{{id5|}}}|{{#ev:youtube|{{{id5}}}|dimensions={{{width|240}}}x{{{height|185}}|inline|<center>{{{description5}}}</center>|urlArgs=start={{{t5}}}}}}}<!-- | ||
</center></includeonly> | |||
-->{{#if:{{{ | |||
A rewrite of the YouTube template which uses [[mw:Extension:EmbedVideo]]. This template has been created solely for testing purposes (at this stage) and is only capable of handling 5 videos currently. The markup is unchanged by default, with the exception of the optional <code>width</code> and <code>height</code> parameters being replaced by a single <code>dimensions</code> parameter. For this parameter, input must be expressed as <code>(width) x (height)</code>. The new template also adds an optional <code>description</code> parameter which allows us to caption embedded videos in the same manner as images and directly uploaded videos (finally!). A new <code>t</code> allows you to start the video at a certain time, which didn't work properly with the old YouTube extension. Given EmbedVideo's broader capabilities, versions of this template can be created for Vimeo, Dailymotion, Archive.org and more. | |||
-->{{#if:{{{ | |||
Example markup: | |||
<code><nowiki>{{YouTube2|id=yuo0EWZMTBc|description=this is the first video|id2=yuo0EWZMTBc|description2=this is the second video|id3=yuo0EWZMTBc|description3=this is the third video|id4=NYkhWaUG5d4|t4=21|description=this is a video with a timestamp (0:21)}}</nowiki></code> | |||
Output (ignore the "Template Loop" message if it appears): | |||
{{YouTube2|id=yuo0EWZMTBc|description=this is the first video|id2=yuo0EWZMTBc|description2=this is the second video|id3=yuo0EWZMTBc|description3=this is the third video|id4=NYkhWaUG5d4|t4=21|description4=this is a video with a timestamp (0:21)}} | |||