Template:YouTube: Difference between revisions

From the Audiovisual Identity Database, the motion graphics museum

Content deleted Content added
Undo revision 176986 by Logohub (talk)
Add space for 5 more videos, totaling to 25
 
(24 intermediate revisions by 5 users not shown)
Line 1: Line 1:
<templatestyles src=Template:YouTube/styles.css />
<center style="margin:0 0 1rem"><!--
<includeonly><center><!--
-->{{#if:{{{id|}}}|{{#tag:youtube|{{{id}}}|width={{{width|240}}}|height={{{height|185}}}}}}} <!--
-->{{#if:{{{id2|}}}|{{#tag:youtube|{{{id2}}}|width={{{width2|240}}}|height={{{height2|185}}}}}}} <!--
-->{{#if:{{{id|}}}|{{#ev:youtube|{{{id}}}|dimensions={{#if:{{{width|}}}|{{{width}}}|240}}x{{#if:{{{height|}}}|{{{height}}}|185}}}|none|{{#if:{{{description|}}}|<center>{{{description}}}</center>}}|urlArgs=start={{{t}}}}}}} <!--
-->{{#if:{{{id3|}}}|{{#tag:youtube|{{{id3}}}|width={{{width3|240}}}|height={{{height3|185}}}}}}} <!--
-->{{#if:{{{id2|}}}|{{#ev:youtube|{{{id2}}}|dimensions={{#if:{{{width2|}}}|{{{width2}}}|240}}x{{#if:{{{height2|}}}|{{{height2}}}|185}}}|none|{{#if:{{{description2|}}}|<center>{{{description2}}}</center>}}|urlArgs=start={{{t2}}}}}}} <!--
-->{{#if:{{{id4|}}}|{{#tag:youtube|{{{id4}}}|width={{{width4|240}}}|height={{{height4|185}}}}}}} <!--
-->{{#if:{{{id3|}}}|{{#ev:youtube|{{{id3}}}|dimensions={{#if:{{{width3|}}}|{{{width3}}}|240}}x{{#if:{{{height3|}}}|{{{height3}}}|185}}}|none|{{#if:{{{description3|}}}|<center>{{{description3}}}</center>}}|urlArgs=start={{{t3}}}}}}} <!--
-->{{#if:{{{id5|}}}|{{#tag:youtube|{{{id5}}}|width={{{width5|240}}}|height={{{height5|185}}}}}}} <!--
-->{{#if:{{{id4|}}}|{{#ev:youtube|{{{id4}}}|dimensions={{#if:{{{width4|}}}|{{{width4}}}|240}}x{{#if:{{{height4|}}}|{{{height4}}}|185}}}|none|{{#if:{{{description4|}}}|<center>{{{description4}}}</center>}}|urlArgs=start={{{t4}}}}}}} <!--
-->{{#if:{{{id6|}}}|{{#tag:youtube|{{{id6}}}|width={{{width6|240}}}|height={{{height6|185}}}}}}} <!--
-->{{#if:{{{id5|}}}|{{#ev:youtube|{{{id5}}}|dimensions={{#if:{{{width5|}}}|{{{width5}}}|240}}x{{#if:{{{height5|}}}|{{{height5}}}|185}}}|none|{{#if:{{{description5|}}}|<center>{{{description5}}}</center>}}|urlArgs=start={{{t5}}}}}}} <!--
-->{{#if:{{{id7|}}}|{{#tag:youtube|{{{id7}}}|width={{{width7|240}}}|height={{{height7|185}}}}}}} <!--
-->{{#if:{{{id6|}}}|{{#ev:youtube|{{{id6}}}|dimensions={{#if:{{{width5|}}}|{{{width6}}}|240}}x{{#if:{{{height6|}}}|{{{height6}}}|185}}}|none|{{#if:{{{description6|}}}|<center>{{{description6}}}</center>}}|urlArgs=start={{{t6}}}}}}} <!--
-->{{#if:{{{id8|}}}|{{#tag:youtube|{{{id8}}}|width={{{width8|240}}}|height={{{height8|185}}}}}}} <!--
-->{{#if:{{{id7|}}}|{{#ev:youtube|{{{id7}}}|dimensions={{#if:{{{width7|}}}|{{{width7}}}|240}}x{{#if:{{{height7|}}}|{{{height7}}}|185}}}|none|{{#if:{{{description7|}}}|<center>{{{description7}}}</center>}}|urlArgs=start={{{t7}}}}}}} <!--
-->{{#if:{{{id9|}}}|{{#tag:youtube|{{{id9}}}|width={{{width9|240}}}|height={{{height9|185}}}}}}} <!--
-->{{#if:{{{id8|}}}|{{#ev:youtube|{{{id8}}}|dimensions={{#if:{{{width8|}}}|{{{width8}}}|240}}x{{#if:{{{height8|}}}|{{{height8}}}|185}}}|none|{{#if:{{{description8|}}}|<center>{{{description8}}}</center>}}|urlArgs=start={{{t8}}}}}}} <!--
-->{{#if:{{{id10|}}}|{{#tag:youtube|{{{id10}}}|width={{{width10|240}}}|height={{{height10|185}}}}}}} <!--
-->{{#if:{{{id9|}}}|{{#ev:youtube|{{{id9}}}|dimensions={{#if:{{{width9|}}}|{{{width9}}}|240}}x{{#if:{{{height9|}}}|{{{height9}}}|185}}}|none|{{#if:{{{description9|}}}|<center>{{{description9}}}</center>}}|urlArgs=start={{{t9}}}}}}} <!--
-->{{#if:{{{id11|}}}|{{#tag:youtube|{{{id11}}}|width={{{width11|240}}}|height={{{height11|185}}}}}}} <!--
-->{{#if:{{{id10|}}}|{{#ev:youtube|{{{id10}}}|dimensions={{#if:{{{width10|}}}|{{{width10}}}|240}}x{{#if:{{{height10|}}}|{{{height10}}}|185}}}|none|{{#if:{{{description10|}}}|<center>{{{description10}}}</center>}}|urlArgs=start={{{t10}}}}}}} <!--
-->{{#if:{{{id12|}}}|{{#tag:youtube|{{{id12}}}|width={{{width12|240}}}|height={{{height12|185}}}}}}} <!--
-->{{#if:{{{id11|}}}|{{#ev:youtube|{{{id11}}}|dimensions={{#if:{{{width11|}}}|{{{width11}}}|240}}x{{#if:{{{height11|}}}|{{{height11}}}|185}}}|none|{{#if:{{{description11|}}}|<center>{{{description11}}}</center>}}|urlArgs=start={{{t11}}}}}}} <!--
-->{{#if:{{{id13|}}}|{{#tag:youtube|{{{id13}}}|width={{{width13|240}}}|height={{{height13|185}}}}}}} <!--
-->{{#if:{{{id12|}}}|{{#ev:youtube|{{{id12}}}|dimensions={{#if:{{{width12|}}}|{{{width12}}}|240}}x{{#if:{{{height12|}}}|{{{height12}}}|185}}}|none|{{#if:{{{description12|}}}|<center>{{{description12}}}</center>}}|urlArgs=start={{{t12}}}}}}} <!--
-->{{#if:{{{id14|}}}|{{#tag:youtube|{{{id14}}}|width={{{width14|240}}}|height={{{height14|185}}}}}}} <!--
-->{{#if:{{{id13|}}}|{{#ev:youtube|{{{id13}}}|dimensions={{#if:{{{width13|}}}|{{{width13}}}|240}}x{{#if:{{{height13|}}}|{{{height13}}}|185}}}|none|{{#if:{{{description13|}}}|<center>{{{description13}}}</center>}}|urlArgs=start={{{t13}}}}}}} <!--
-->{{#if:{{{id15|}}}|{{#tag:youtube|{{{id15}}}|width={{{width15|240}}}|height={{{height15|185}}}}}}} <!--
-->{{#if:{{{id14|}}}|{{#ev:youtube|{{{id14}}}|dimensions={{#if:{{{width14|}}}|{{{width14}}}|240}}x{{#if:{{{height14|}}}|{{{height14}}}|185}}}|none|{{#if:{{{description14|}}}|<center>{{{description14}}}</center>}}|urlArgs=start={{{t14}}}}}}} <!--
-->{{#if:{{{id16|}}}|{{#tag:youtube|{{{id16}}}|width={{{width16|240}}}|height={{{height16|185}}}}}}} <!--
-->{{#if:{{{id15|}}}|{{#ev:youtube|{{{id15}}}|dimensions={{#if:{{{width15|}}}|{{{width15}}}|240}}x{{#if:{{{height15|}}}|{{{height15}}}|185}}}|none|{{#if:{{{description15|}}}|<center>{{{description15}}}</center>}}|urlArgs=start={{{t15}}}}}}} <!--
-->{{#if:{{{id17|}}}|{{#tag:youtube|{{{id17}}}|width={{{width17|240}}}|height={{{height17|185}}}}}}} <!--
-->{{#if:{{{id16|}}}|{{#ev:youtube|{{{id16}}}|dimensions={{#if:{{{width16|}}}|{{{width16}}}|240}}x{{#if:{{{height16|}}}|{{{height16}}}|185}}}|none|{{#if:{{{description16|}}}|<center>{{{description16}}}</center>}}|urlArgs=start={{{t16}}}}}}} <!--
-->{{#if:{{{id18|}}}|{{#tag:youtube|{{{id18}}}|width={{{width18|240}}}|height={{{height18|185}}}}}}} <!--
-->{{#if:{{{id17|}}}|{{#ev:youtube|{{{id17}}}|dimensions={{#if:{{{width17|}}}|{{{width17}}}|240}}x{{#if:{{{height17|}}}|{{{height17}}}|185}}}|none|{{#if:{{{description17|}}}|<center>{{{description17}}}</center>}}|urlArgs=start={{{t17}}}}}}} <!--
-->{{#if:{{{id19|}}}|{{#tag:youtube|{{{id19}}}|width={{{width19|240}}}|height={{{height19|185}}}}}}} <!--
-->{{#if:{{{id18|}}}|{{#ev:youtube|{{{id18}}}|dimensions={{#if:{{{width18|}}}|{{{width18}}}|240}}x{{#if:{{{height18|}}}|{{{height18}}}|185}}}|none|{{#if:{{{description18|}}}|<center>{{{description18}}}</center>}}|urlArgs=start={{{t18}}}}}}} <!--
-->{{#if:{{{id20|}}}|{{#tag:youtube|{{{id20}}}|width={{{width20|240}}}|height={{{height20|185}}}}}}} </center><noinclude>
-->{{#if:{{{id19|}}}|{{#ev:youtube|{{{id19}}}|dimensions={{#if:{{{width19|}}}|{{{width19}}}|240}}x{{#if:{{{height19|}}}|{{{height19}}}|185}}}|none|{{#if:{{{description19|}}}|<center>{{{description19}}}</center>}}|urlArgs=start={{{t19}}}}}}} <!--
-->{{#if:{{{id20|}}}|{{#ev:youtube|{{{id20}}}|dimensions={{#if:{{{width20|}}}|{{{width20}}}|240}}x{{#if:{{{height20|}}}|{{{height20}}}|185}}}|none|{{#if:{{{description20|}}}|<center>{{{description20}}}</center>}}|urlArgs=start={{{t20}}}}}}} <!--
''For information on this template and its usage, see [[CLG Wiki:Tutorial Guide#Adding Videos|CLG Wiki:Tutorial Guide § Adding Videos]]''
-->{{#if:{{{id21|}}}|{{#ev:youtube|{{{id21}}}|dimensions={{#if:{{{width21|}}}|{{{width21}}}|240}}x{{#if:{{{height21|}}}|{{{height21}}}|185}}}|none|{{#if:{{{description21|}}}|<center>{{{description21}}}</center>}}|urlArgs=start={{{t21}}}}}}} <!--
</noinclude>
-->{{#if:{{{id22|}}}|{{#ev:youtube|{{{id22}}}|dimensions={{#if:{{{width22|}}}|{{{width22}}}|240}}x{{#if:{{{height22|}}}|{{{height22}}}|185}}}|none|{{#if:{{{description22|}}}|<center>{{{description22}}}</center>}}|urlArgs=start={{{t22}}}}}}} <!--
-->{{#if:{{{id23|}}}|{{#ev:youtube|{{{id23}}}|dimensions={{#if:{{{width23|}}}|{{{width23}}}|240}}x{{#if:{{{height23|}}}|{{{height23}}}|185}}}|none|{{#if:{{{description23|}}}|<center>{{{description23}}}</center>}}|urlArgs=start={{{t23}}}}}}} <!--
-->{{#if:{{{id24|}}}|{{#ev:youtube|{{{id24}}}|dimensions={{#if:{{{width24|}}}|{{{width24}}}|240}}x{{#if:{{{height24|}}}|{{{height24}}}|185}}}|none|{{#if:{{{description24|}}}|<center>{{{description24}}}</center>}}|urlArgs=start={{{t24}}}}}}} <!--
-->{{#if:{{{id25|}}}|{{#ev:youtube|{{{id25}}}|dimensions={{#if:{{{width25|}}}|{{{width25}}}|240}}x{{#if:{{{height25|}}}|{{{height25}}}|185}}}|none|{{#if:{{{description25|}}}|<center>{{{description25}}}</center>}}|urlArgs=start={{{t25}}}}}}}</center></includeonly>
<noinclude>{{Documentation}}</noinclude>

Latest revision as of 11:44, 17 August 2024

Template documentation

A rewrite of the YouTube template which uses mw:Extension:EmbedVideo. 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 parameter allows you to start the video at a certain timestamp, 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 (without description): {{YouTube|id=yuo0EWZMTBc|id2=yuo0EWZMTBc|id3=yuo0EWZMTBc|id4=AZFjpcHNzNs|t4=21}}

Output (without description):


Example markup (with description): {{YouTube|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=AZFjpcHNzNs|t4=21|description4=this is a video with a timestamp (0:21)}}

Output (with description) (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)

</noinclude>

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