Difference between revisions of "Template:Youtube-box"

From Custom Mario Kart
Jump to navigation Jump to search
m (Protected "Template:Youtube-box": High traffic page ([Edit=Allow only administrators] (indefinite) [Move=Allow only administrators] (indefinite)))
Line 1: Line 1:
<includeonly>{|class="youtube textbox video {{{1|}}}" style="border:0 none"
+
<includeonly>{|class=""
{{#if:{{{3}}}|{{!}}+}}{{{3|Video}}}
+
{{#ev:youtube|{{{2}}}|||{{{3}}}||start={{{4|0}}}&end={{{5|3600}}}}}
|style=padding:0;line-height:0|{{#widget:YouTube|id={{{2}}}|width={{{width|400}}}|height={{{height|225}}}}}
 
 
|}<!--
 
|}<!--
-->{{#switch:{{{1|}}}|blue|blue left|left|left blue=[[Category:Youtube-box/blue left]]}}<!--
 
-->{{#if:{{#pos:{{{3|}}}|Dolphin}}|[[Category:Youtube-box/Dolphin]]}}<!--
 
 
--></includeonly><noinclude>
 
--></includeonly><noinclude>
 +
 
== Usage ==
 
== Usage ==
  <nowiki>{{youtube-box|textbox_attributes|youtube_id|title text}}</nowiki>
+
  <nowiki>{{youtube-box|textbox_attributes|youtube_id|title text|start time|end time}}</nowiki>
* '''textbox_attributes:''' attributes for [[Template:Textbox]], one of:
+
* '''legacy''' textbox_attributes:''' attributes for [[Template:Textbox]], one of:
** '''bug:''' videos about bugs and glitches
+
** '''legacy''' bug: videos about bugs and glitches
** '''original:''' videos of original tracks.
+
** '''legacy''' original: videos of original tracks.
** '''tutorial:''' tutorial videos.
+
** '''legacy''' tutorial: tutorial videos.
** empty for all other kinds of videos (standard video)
+
** '''unused''' for all videos
 
* '''youtube_id:''' ID of YouTube video
 
* '''youtube_id:''' ID of YouTube video
* '''title text:''' text of header line
+
* '''description text:''' text of description line
 +
* '''start time:''' time in seconds of when the video should start
 +
* '''end time:''' time in seconds of when the video should end
  
 
== Examples ==
 
== Examples ==
 
<pre><nowiki>
 
<pre><nowiki>
{{youtube-box||3T7ieq27WMc|[[N64 Yoshi Valley]]}}
+
{{youtube-box||3T7ieq27WMc|[[N64 Yoshi Valley]]|160|170}}
 
{{youtube-box|bug|3T7ieq27WMc|bug}}
 
{{youtube-box|bug|3T7ieq27WMc|bug}}
 
{{youtube-box|original|3T7ieq27WMc|original}}
 
{{youtube-box|original|3T7ieq27WMc|original}}
{{youtube-box|tutorial|3T7ieq27WMc|tutorial}}
+
{{youtube-box|tutorial|3T7ieq27WMc|tutorial|76}}
 
</nowiki></pre>
 
</nowiki></pre>
  
{{youtube-box||3T7ieq27WMc|[[N64 Yoshi Valley]]}}
+
{{youtube-box||3T7ieq27WMc|[[N64 Yoshi Valley]]|160|170}}
 
{{youtube-box|bug|3T7ieq27WMc|bug}}
 
{{youtube-box|bug|3T7ieq27WMc|bug}}
 
{{youtube-box|original|3T7ieq27WMc|original}}
 
{{youtube-box|original|3T7ieq27WMc|original}}
{{youtube-box|tutorial|3T7ieq27WMc|tutorial}}
+
{{youtube-box|tutorial|3T7ieq27WMc|tutorial|76}}
 
 
 
[[Category:Template/Include]]</noinclude>
 
[[Category:Template/Include]]</noinclude>

Revision as of 13:11, 2 March 2022


Usage

{{youtube-box|textbox_attributes|youtube_id|title text|start time|end time}}
  • legacy textbox_attributes: attributes for Template:Textbox, one of:
    • legacy bug: videos about bugs and glitches
    • legacy original: videos of original tracks.
    • legacy tutorial: tutorial videos.
    • unused for all videos
  • youtube_id: ID of YouTube video
  • description text: text of description line
  • start time: time in seconds of when the video should start
  • end time: time in seconds of when the video should end

Examples

{{youtube-box||3T7ieq27WMc|[[N64 Yoshi Valley]]|160|170}}
{{youtube-box|bug|3T7ieq27WMc|bug}}
{{youtube-box|original|3T7ieq27WMc|original}}
{{youtube-box|tutorial|3T7ieq27WMc|tutorial|76}}
bug
original
tutorial