Difference between revisions of "Template:Youtube"

From Grand Theft Wiki
Jump to navigation Jump to search
(testing template)
 
 
(22 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<includeonly><center>{|
+
<includeonly><table style="margin:auto">
{{#if:{{{title1|}}}
+
<tr>
! |[http://www.youtube.com/watch?v={{{video1}}} {{{title1}}}]
+
{{#if:{{{title1|}}}|<th style="text-align:center"> [https://www.youtube.com/watch?v={{{video1}}} {{{title1}}}] </th>}}
|-
+
{{#if:{{{title2|}}}|<th style="text-align:center"> [https://www.youtube.com/watch?v={{{video2}}} {{{title2}}}] </th>}}
|<youtube>{{{video1}}}</youtube>
+
{{#if:{{{title3|}}}|<th style="text-align:center"> [https://www.youtube.com/watch?v={{{video3}}} {{{title3}}}] </th>}}
}}
+
{{#if:{{{title4|}}}|<th style="text-align:center"> [https://www.youtube.com/watch?v={{{video4}}} {{{title4}}}] </th>}}
{{#if:{{{title2|}}}
+
{{#if:{{{title5|}}}|<th style="text-align:center"> [https://www.youtube.com/watch?v={{{video5}}} {{{title5}}}] </th>}}
! |[http://www.youtube.com/watch?v={{{video2}}} {{{title2}}}]
+
</tr>
|-
+
<tr>
|<youtube>{{{video2}}}</youtube>
+
{{#if:{{{video1|}}}|<td>{{#ev:youtube|{{{video1}}}|{{#if:{{{width1|}}}|{{{width1}}}|500}}}}</td>}}
}}
+
{{#if:{{{video2|}}}|<td>{{#ev:youtube|{{{video2}}}|{{#if:{{{width2|}}}|{{{width2}}}|500}}}}</td>}}
|}</center></includeonly><noinclude>
+
{{#if:{{{video3|}}}|<td>{{#ev:youtube|{{{video3}}}|{{#if:{{{width3|}}}|{{{width3}}}|500}}}}</td>}}
<pre>
+
{{#if:{{{video4|}}}|<td>{{#ev:youtube|{{{video4}}}|{{#if:{{{width4|}}}|{{{width4}}}|500}}}}</td>}}
{{embedyt
+
{{#if:{{{video5|}}}|<td>{{#ev:youtube|{{{video5}}}|{{#if:{{{width5|}}}|{{{width5}}}|500}}}}</td>}}
|title1 = First video title
+
</tr>
|video1 = First YouTube video ID
+
</table></includeonly><noinclude>{{doc}}</noinclude>
|title2 = Second ideo title
 
|video2 = Second YouTube video ID
 
}}
 
</pre>
 
</noinclude>
 

Latest revision as of 23:13, 11 July 2015

This documentation is imported from Template:Youtube/doc

This template embeds 1~5 YouTube videos into a page.

Note that you can also use {{YoutubeAudio}} to hide the video and use YouTube as an audio player.

Parameters
{{youtube
| video1 = First YouTube video ID
| title1 = Video title (optional)
| width1 = Width of video (optional, default 500 pixels)
| video2 = Second YouTube video ID
| title2 = Video title (optional)
| width2 = Width of video (optional, default 500 pixels)
| video3 = Third YouTube video ID
| title3 = Video title (optional)
| width3 = Width of video (optional, default 500 pixels)
| video4 = Fourth YouTube video ID
| title4 = Video title (optional)
| width4 = Width of video (optional, default 500 pixels)
| video5 = Fifth YouTube video ID
| title5 = Video title (optional)
| width5 = Width of video (optional, default 500 pixels)
}}
Example 1
{{youtube
| video1 = MpmDawqOfqs
| title1 = GTA Vice City trailer
}}





GTA Vice City trailer
{{#ev:youtube|MpmDawqOfqs|500}}
Example 2
{{youtube
| video1 = nFKjLYjw7qc
| title1 = GTA Vice City Pedestrians rioting<br />with weapons
| width1 = 400
| video2 = GiSTbq-u37Y
| title2 = Vice City Riots
| width2 = 400
| video3 = m47D6ETyqvo
| title3 = Vice City:Pedestrians rioting
| width3 = 400
}}



GTA Vice City Pedestrians rioting
with weapons
Vice City Riots Vice City:Pedestrians rioting
{{#ev:youtube|nFKjLYjw7qc|400}} {{#ev:youtube|GiSTbq-u37Y|400}} {{#ev:youtube|m47D6ETyqvo|400}}