Template:YouTube: Difference between revisions

From the Audiovisual Identity Database, the motion graphics museum

Content deleted Content added
No edit summary
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:
<includeonly><center style="margin:0 0 1rem"><!--
-->{{#if:{{{id|}}}|{{#tagev:youtube|{{{id}}}|widthdimensions={{{width|240}}}|height=x{{{height|185}}|inline|<center>{{{description}}}</center>|urlArgs=start={{{t}}}}}}} <!--
-->{{#if:{{{id2|}}}|{{#tagev:youtube|{{{id2}}}|widthdimensions={{{width2width|240}}}|height=x{{{height2height|185}}|inline|<center>{{{description2}}}</center>|urlArgs=start={{{t2}}}}}}} <!--
-->{{#if:{{{id3|}}}|{{#tagev:youtube|{{{id3}}}|widthdimensions={{{width3width|240}}}|height=x{{{height3height|185}}|inline|<center>{{{description3}}}</center>|urlArgs=start={{{t3}}}}}}} <!--
-->{{#if:{{{id4|}}}|{{#tagev:youtube|{{{id4}}}|widthdimensions={{{width4width|240}}}|height=x{{{height4height|185}}|inline|<center>{{{description4}}}</center>|urlArgs=start={{{t4}}}}}}} <!--
-->{{#if:{{{id5|}}}|{{#tagev:youtube|{{{id5}}}|widthdimensions={{{width5width|240}}}|height=x{{{height5height|185}}|inline|<center>{{{description5}}}</center>|urlArgs=start={{{t5}}}}}}} <!--
</center></includeonly>
-->{{#if:{{{id6|}}}|{{#tag:youtube|{{{id6}}}|width={{{width6|240}}}|height={{{height6|185}}}}}}} <!--
 
-->{{#if:{{{id7|}}}|{{#tag:youtube|{{{id7}}}|width={{{width7|240}}}|height={{{height7|185}}}}}}} <!--
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:{{{id8|}}}|{{#tag:youtube|{{{id8}}}|width={{{width8|240}}}|height={{{height8|185}}}}}}} <!--
 
-->{{#if:{{{id9|}}}|{{#tag:youtube|{{{id9}}}|width={{{width9|240}}}|height={{{height9|185}}}}}}} <!--
Example markup:
-->{{#if:{{{id10|}}}|{{#tag:youtube|{{{id10}}}|width={{{width10|240}}}|height={{{height10|185}}}}}}} <!--
<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>
-->{{#if:{{{id11|}}}|{{#tag:youtube|{{{id11}}}|width={{{width11|240}}}|height={{{height11|185}}}}}}} <!--
 
-->{{#if:{{{id12|}}}|{{#tag:youtube|{{{id12}}}|width={{{width12|240}}}|height={{{height12|185}}}}}}} <!--
Output (ignore the "Template Loop" message if it appears):
-->{{#if:{{{id13|}}}|{{#tag:youtube|{{{id13}}}|width={{{width13|240}}}|height={{{height13|185}}}}}}} <!--
{{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)}}
-->{{#if:{{{id14|}}}|{{#tag:youtube|{{{id14}}}|width={{{width14|240}}}|height={{{height14|185}}}}}}} <!--
-->{{#if:{{{id15|}}}|{{#tag:youtube|{{{id15}}}|width={{{width15|240}}}|height={{{height15|185}}}}}}} <!--
-->{{#if:{{{id16|}}}|{{#tag:youtube|{{{id16}}}|width={{{width16|240}}}|height={{{height16|185}}}}}}} <!--
-->{{#if:{{{id17|}}}|{{#tag:youtube|{{{id17}}}|width={{{width17|240}}}|height={{{height17|185}}}}}}} <!--
-->{{#if:{{{id18|}}}|{{#tag:youtube|{{{id18}}}|width={{{width18|240}}}|height={{{height18|185}}}}}}} <!--
-->{{#if:{{{id19|}}}|{{#tag:youtube|{{{id19}}}|width={{{width19|240}}}|height={{{height19|185}}}}}}} <!--
-->{{#if:{{{id20|}}}|{{#tag:youtube|{{{id20}}}|width={{{width20|240}}}|height={{{height20|185}}}}}}} </center><noinclude>
''For information on this template and its usage, see [[CLG Wiki:Tutorial Guide#Adding Videos|CLG Wiki:Tutorial Guide § Adding Videos]]''
</noinclude>

Revision as of 02:13, 26 September 2022


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 width and height parameters being replaced by a single dimensions parameter. For this parameter, input must be expressed as (width) x (height). The new template also adds an optional description parameter which allows us to caption embedded videos in the same manner as images and directly uploaded videos (finally!). A new t 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.

Example markup: {{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)}}

Output (ignore the "Template Loop" message if it appears):

this is the first video

this is the second video

this is the third video

this is a video with a timestamp (0:21)

Cookies help us deliver our services. By using our services, you agree to our use of cookies.