Vorlage:YouTube: Unterschied zwischen den Versionen

Aus skandinavien-wiki.net
Keine Bearbeitungszusammenfassung
Keine Bearbeitungszusammenfassung
 
Zeile 2: Zeile 2:
<templatestyles src=Template:YouTube/styles.css />
<templatestyles src=Template:YouTube/styles.css />
<!--
<!--
--><div style="float:left;margin-right:1em">{{#if:{{{id|}}}|{{#ev:youtube|{{{id}}}|dimensions={{#if:{{{width|}}}|{{{width}}}|220}}x{{#if:{{{height|}}}|{{{height}}}|165}}}|left|{{#if:{{{description|}}}|<center>{{{description}}}</center>}}|urlArgs=start={{{t}}}}}}}</div><!--
--><div style="float:left;margin-right:1em;margin-top:0.5em">{{#if:{{{id|}}}|{{#ev:youtube|{{{id}}}|dimensions={{#if:{{{width|}}}|{{{width}}}|220}}x{{#if:{{{height|}}}|{{{height}}}|165}}}|left|{{#if:{{{description|}}}|<center>{{{description}}}</center>}}|urlArgs=start={{{t}}}}}}}</div><!--
--><div style="float:left;margin-right:1em">{{#if:{{{id2|}}}|{{#ev:youtube|{{{id2}}}|dimensions={{#if:{{{width2|}}}|{{{width2}}}|220}}x{{#if:{{{height2|}}}|{{{height2}}}|165}}}|left|{{#if:{{{description2|}}}|<center>{{{description2}}}</center>}}|urlArgs=start={{{t2}}}}}}}</div><!--
--><div style="float:left;margin-right:1em;margin-top:0.5em">{{#if:{{{id2|}}}|{{#ev:youtube|{{{id2}}}|dimensions={{#if:{{{width2|}}}|{{{width2}}}|220}}x{{#if:{{{height2|}}}|{{{height2}}}|165}}}|left|{{#if:{{{description2|}}}|<center>{{{description2}}}</center>}}|urlArgs=start={{{t2}}}}}}}</div><!--
--><div style="float:left;margin-right:1em">{{#if:{{{id3|}}}|{{#ev:youtube|{{{id3}}}|dimensions={{#if:{{{width3|}}}|{{{width3}}}|220}}x{{#if:{{{height3|}}}|{{{height3}}}|165}}}|left|{{#if:{{{description3|}}}|<center>{{{description3}}}</center>}}|urlArgs=start={{{t3}}}}}}}</div><!--
--><div style="float:left;margin-right:1em;margin-top:0.5em">{{#if:{{{id3|}}}|{{#ev:youtube|{{{id3}}}|dimensions={{#if:{{{width3|}}}|{{{width3}}}|220}}x{{#if:{{{height3|}}}|{{{height3}}}|165}}}|left|{{#if:{{{description3|}}}|<center>{{{description3}}}</center>}}|urlArgs=start={{{t3}}}}}}}</div><!--
--><div style="float:left;margin-right:1em">{{#if:{{{id4|}}}|{{#ev:youtube|{{{id4}}}|dimensions={{#if:{{{width4|}}}|{{{width4}}}|220}}x{{#if:{{{height4|}}}|{{{height4}}}|165}}}|left|{{#if:{{{description4|}}}|<center>{{{description4}}}</center>}}|urlArgs=start={{{t4}}}}}}}</div><!--
--><div style="float:left;margin-right:1em;margin-top:0.5em">{{#if:{{{id4|}}}|{{#ev:youtube|{{{id4}}}|dimensions={{#if:{{{width4|}}}|{{{width4}}}|220}}x{{#if:{{{height4|}}}|{{{height4}}}|165}}}|left|{{#if:{{{description4|}}}|<center>{{{description4}}}</center>}}|urlArgs=start={{{t4}}}}}}}</div><!--
--><div style="float:left;margin-right:1em">{{#if:{{{id5|}}}|{{#ev:youtube|{{{id5}}}|dimensions={{#if:{{{width5|}}}|{{{width5}}}|220}}x{{#if:{{{height5|}}}|{{{height5}}}|165}}}|left|{{#if:{{{description5|}}}|<center>{{{description5}}}</center>}}|urlArgs=start={{{t5}}}}}}}</div><!--
--><div style="float:left;margin-right:1em;margin-top:0.5em">{{#if:{{{id5|}}}|{{#ev:youtube|{{{id5}}}|dimensions={{#if:{{{width5|}}}|{{{width5}}}|220}}x{{#if:{{{height5|}}}|{{{height5}}}|165}}}|left|{{#if:{{{description5|}}}|<center>{{{description5}}}</center>}}|urlArgs=start={{{t5}}}}}}}</div><!--
--><div style="float:left;margin-right:1em">{{#if:{{{id6|}}}|{{#ev:youtube|{{{id6}}}|dimensions={{#if:{{{width5|}}}|{{{width6}}}|220}}x{{#if:{{{height6|}}}|{{{height6}}}|165}}}|left|{{#if:{{{description6|}}}|<center>{{{description6}}}</center>}}|urlArgs=start={{{t6}}}}}}}<!--
--><div style="float:left;margin-right:1em;margin-top:0.5em">{{#if:{{{id6|}}}|{{#ev:youtube|{{{id6}}}|dimensions={{#if:{{{width5|}}}|{{{width6}}}|220}}x{{#if:{{{height6|}}}|{{{height6}}}|165}}}|left|{{#if:{{{description6|}}}|<center>{{{description6}}}</center>}}|urlArgs=start={{{t6}}}}}}}<!--
--><div style="float:left;margin-right:1em">{{#if:{{{id7|}}}|{{#ev:youtube|{{{id7}}}|dimensions={{#if:{{{width7|}}}|{{{width7}}}|220}}x{{#if:{{{height7|}}}|{{{height7}}}|165}}}|left|{{#if:{{{description7|}}}|<center>{{{description7}}}</center>}}|urlArgs=start={{{t7}}}}}}}</div><!--
--><div style="float:left;margin-right:1em;margin-top:0.5em">{{#if:{{{id7|}}}|{{#ev:youtube|{{{id7}}}|dimensions={{#if:{{{width7|}}}|{{{width7}}}|220}}x{{#if:{{{height7|}}}|{{{height7}}}|165}}}|left|{{#if:{{{description7|}}}|<center>{{{description7}}}</center>}}|urlArgs=start={{{t7}}}}}}}</div><!--
--><div style="float:left;margin-right:1em">{{#if:{{{id8|}}}|{{#ev:youtube|{{{id8}}}|dimensions={{#if:{{{width8|}}}|{{{width8}}}|220}}x{{#if:{{{height8|}}}|{{{height8}}}|165}}}|left|{{#if:{{{description8|}}}|<center>{{{description8}}}</center>}}|urlArgs=start={{{t8}}}}}}}</div><!--
--><div style="float:left;margin-right:1em;margin-top:0.5em">{{#if:{{{id8|}}}|{{#ev:youtube|{{{id8}}}|dimensions={{#if:{{{width8|}}}|{{{width8}}}|220}}x{{#if:{{{height8|}}}|{{{height8}}}|165}}}|left|{{#if:{{{description8|}}}|<center>{{{description8}}}</center>}}|urlArgs=start={{{t8}}}}}}}</div><!--
--><div style="float:left;margin-right:1em">{{#if:{{{id9|}}}|{{#ev:youtube|{{{id9}}}|dimensions={{#if:{{{width9|}}}|{{{width9}}}|220}}x{{#if:{{{height9|}}}|{{{height9}}}|165}}}|left|{{#if:{{{description9|}}}|<center>{{{description9}}}</center>}}|urlArgs=start={{{t9}}}}}}}</div><!--
--><div style="float:left;margin-right:1em;margin-top:0.5em">{{#if:{{{id9|}}}|{{#ev:youtube|{{{id9}}}|dimensions={{#if:{{{width9|}}}|{{{width9}}}|220}}x{{#if:{{{height9|}}}|{{{height9}}}|165}}}|left|{{#if:{{{description9|}}}|<center>{{{description9}}}</center>}}|urlArgs=start={{{t9}}}}}}}</div><!--
--><div style="float:left;margin-right:1em">{{#if:{{{id10|}}}|{{#ev:youtube|{{{id10}}}|dimensions={{#if:{{{width10|}}}|{{{width10}}}|220}}x{{#if:{{{height10|}}}|{{{height10}}}|165}}}|left|{{#if:{{{description10|}}}|<center>{{{description10}}}</center>}}|urlArgs=start={{{t10}}}}}}}</div><!--
--><div style="float:left;margin-right:1em;margin-top:0.5em">{{#if:{{{id10|}}}|{{#ev:youtube|{{{id10}}}|dimensions={{#if:{{{width10|}}}|{{{width10}}}|220}}x{{#if:{{{height10|}}}|{{{height10}}}|165}}}|left|{{#if:{{{description10|}}}|<center>{{{description10}}}</center>}}|urlArgs=start={{{t10}}}}}}}</div><!--
--><div style="float:left;margin-right:1em">{{#if:{{{id11|}}}|{{#ev:youtube|{{{id11}}}|dimensions={{#if:{{{width11|}}}|{{{width11}}}|220}}x{{#if:{{{height11|}}}|{{{height11}}}|165}}}|left|{{#if:{{{description11|}}}|<center>{{{description11}}}</center>}}|urlArgs=start={{{t11}}}}}}}</div><!--
--><div style="float:left;margin-right:1em;margin-top:0.5em">{{#if:{{{id11|}}}|{{#ev:youtube|{{{id11}}}|dimensions={{#if:{{{width11|}}}|{{{width11}}}|220}}x{{#if:{{{height11|}}}|{{{height11}}}|165}}}|left|{{#if:{{{description11|}}}|<center>{{{description11}}}</center>}}|urlArgs=start={{{t11}}}}}}}</div><!--
--><div style="float:left;margin-right:1em">{{#if:{{{id12|}}}|{{#ev:youtube|{{{id12}}}|dimensions={{#if:{{{width12|}}}|{{{width12}}}|220}}x{{#if:{{{height12|}}}|{{{height12}}}|165}}}|left|{{#if:{{{description12|}}}|<center>{{{description12}}}</center>}}|urlArgs=start={{{t12}}}}}}}</div><!--
--><div style="float:left;margin-right:1em;margin-top:0.5em">{{#if:{{{id12|}}}|{{#ev:youtube|{{{id12}}}|dimensions={{#if:{{{width12|}}}|{{{width12}}}|220}}x{{#if:{{{height12|}}}|{{{height12}}}|165}}}|left|{{#if:{{{description12|}}}|<center>{{{description12}}}</center>}}|urlArgs=start={{{t12}}}}}}}</div><!--
--><div style="float:left;margin-right:1em">{{#if:{{{id13|}}}|{{#ev:youtube|{{{id13}}}|dimensions={{#if:{{{width13|}}}|{{{width13}}}|220}}x{{#if:{{{height13|}}}|{{{height13}}}|165}}}|left|{{#if:{{{description13|}}}|<center>{{{description13}}}</center>}}|urlArgs=start={{{t13}}}}}}}</div><!--
--><div style="float:left;margin-right:1em;margin-top:0.5em">{{#if:{{{id13|}}}|{{#ev:youtube|{{{id13}}}|dimensions={{#if:{{{width13|}}}|{{{width13}}}|220}}x{{#if:{{{height13|}}}|{{{height13}}}|165}}}|left|{{#if:{{{description13|}}}|<center>{{{description13}}}</center>}}|urlArgs=start={{{t13}}}}}}}</div><!--
--><div style="float:left;margin-right:1em">{{#if:{{{id14|}}}|{{#ev:youtube|{{{id14}}}|dimensions={{#if:{{{width14|}}}|{{{width14}}}|220}}x{{#if:{{{height14|}}}|{{{height14}}}|165}}}|left|{{#if:{{{description14|}}}|<center>{{{description14}}}</center>}}|urlArgs=start={{{t14}}}}}}}</div><!--
--><div style="float:left;margin-right:1em;margin-top:0.5em">{{#if:{{{id14|}}}|{{#ev:youtube|{{{id14}}}|dimensions={{#if:{{{width14|}}}|{{{width14}}}|220}}x{{#if:{{{height14|}}}|{{{height14}}}|165}}}|left|{{#if:{{{description14|}}}|<center>{{{description14}}}</center>}}|urlArgs=start={{{t14}}}}}}}</div><!--
--><div style="float:left;margin-right:1em">{{#if:{{{id15|}}}|{{#ev:youtube|{{{id15}}}|dimensions={{#if:{{{width15|}}}|{{{width15}}}|220}}x{{#if:{{{height15|}}}|{{{height15}}}|165}}}|none|{{#if:{{{description15|}}}|<center>{{{description15}}}</center>}}|urlArgs=start={{{t15}}}}}}}</div><!--
--><div style="float:left;margin-right:1em;margin-top:0.5em">{{#if:{{{id15|}}}|{{#ev:youtube|{{{id15}}}|dimensions={{#if:{{{width15|}}}|{{{width15}}}|220}}x{{#if:{{{height15|}}}|{{{height15}}}|165}}}|none|{{#if:{{{description15|}}}|<center>{{{description15}}}</center>}}|urlArgs=start={{{t15}}}}}}}</div><!--
--><div style="float:left;margin-right:1em">{{#if:{{{id16|}}}|{{#ev:youtube|{{{id16}}}|dimensions={{#if:{{{width16|}}}|{{{width16}}}|220}}x{{#if:{{{height16|}}}|{{{height16}}}|165}}}|left|{{#if:{{{description16|}}}|<center>{{{description16}}}</center>}}|urlArgs=start={{{t16}}}}}}}</div><!--
--><div style="float:left;margin-right:1em;margin-top:0.5em">{{#if:{{{id16|}}}|{{#ev:youtube|{{{id16}}}|dimensions={{#if:{{{width16|}}}|{{{width16}}}|220}}x{{#if:{{{height16|}}}|{{{height16}}}|165}}}|left|{{#if:{{{description16|}}}|<center>{{{description16}}}</center>}}|urlArgs=start={{{t16}}}}}}}</div><!--
--><div style="float:left;margin-right:1em">{{#if:{{{id17|}}}|{{#ev:youtube|{{{id17}}}|dimensions={{#if:{{{width17|}}}|{{{width17}}}|220}}x{{#if:{{{height17|}}}|{{{height17}}}|165}}}|left|{{#if:{{{description17|}}}|<center>{{{description17}}}</center>}}|urlArgs=start={{{t17}}}}}}}</div><!--
--><div style="float:left;margin-right:1em;margin-top:0.5em">{{#if:{{{id17|}}}|{{#ev:youtube|{{{id17}}}|dimensions={{#if:{{{width17|}}}|{{{width17}}}|220}}x{{#if:{{{height17|}}}|{{{height17}}}|165}}}|left|{{#if:{{{description17|}}}|<center>{{{description17}}}</center>}}|urlArgs=start={{{t17}}}}}}}</div><!--
--><div style="float:left;margin-right:1em">{{#if:{{{id18|}}}|{{#ev:youtube|{{{id18}}}|dimensions={{#if:{{{width18|}}}|{{{width18}}}|220}}x{{#if:{{{height18|}}}|{{{height18}}}|165}}}|left|{{#if:{{{description18|}}}|<center>{{{description18}}}</center>}}|urlArgs=start={{{t18}}}}}}}</div><!--
--><div style="float:left;margin-right:1em;margin-top:0.5em">{{#if:{{{id18|}}}|{{#ev:youtube|{{{id18}}}|dimensions={{#if:{{{width18|}}}|{{{width18}}}|220}}x{{#if:{{{height18|}}}|{{{height18}}}|165}}}|left|{{#if:{{{description18|}}}|<center>{{{description18}}}</center>}}|urlArgs=start={{{t18}}}}}}}</div><!--
--><div style="float:left;margin-right:1em">{{#if:{{{id19|}}}|{{#ev:youtube|{{{id19}}}|dimensions={{#if:{{{width19|}}}|{{{width19}}}|220}}x{{#if:{{{height19|}}}|{{{height19}}}|165}}}|left|{{#if:{{{description19|}}}|<center>{{{description19}}}</center>}}|urlArgs=start={{{t19}}}}}}}</div><!--
--><div style="float:left;margin-right:1em;margin-top:0.5em">{{#if:{{{id19|}}}|{{#ev:youtube|{{{id19}}}|dimensions={{#if:{{{width19|}}}|{{{width19}}}|220}}x{{#if:{{{height19|}}}|{{{height19}}}|165}}}|left|{{#if:{{{description19|}}}|<center>{{{description19}}}</center>}}|urlArgs=start={{{t19}}}}}}}</div><!--
--><div style="float:left;margin-right:1em">{{#if:{{{id20|}}}|{{#ev:youtube|{{{id20}}}|dimensions={{#if:{{{width20|}}}|{{{width20}}}|220}}x{{#if:{{{height20|}}}|{{{height20}}}|165}}}|left|{{#if:{{{description20|}}}|<center>{{{description20}}}</center>}}|urlArgs=start={{{t20}}}}}}}</div></div>{{Absatz}}
--><div style="float:left;margin-right:1em;margin-top:0.5em">{{#if:{{{id20|}}}|{{#ev:youtube|{{{id20}}}|dimensions={{#if:{{{width20|}}}|{{{width20}}}|220}}x{{#if:{{{height20|}}}|{{{height20}}}|165}}}|left|{{#if:{{{description20|}}}|<center>{{{description20}}}</center>}}|urlArgs=start={{{t20}}}}}}}</div></div>{{Absatz}}
</includeonly>
</includeonly>
<noinclude>
<noinclude>

Aktuelle Version vom 22. Februar 2023, 20:02 Uhr


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|description=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)