Youtube – Template

From Bohemia Interactive Community
Jump to navigation Jump to search
m (test)
m (Text replacement - "Category:Templates" to "{{uc:{{PAGENAME}}}}")
(8 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly>{{#if:{{{1|}}}
<includeonly>{{#if:{{{1|}}}
| <div class="t{{#ifeq:{{{3|}}}|right|right|{{#ifeq:{{{3|}}}|left|left|center}}}}" style="clear:none"><div class="thumbinner" style="width: {{{4|300}}}px">{{#ev:youtube|{{{1}}}|{{{4|300}}}}}{{#if:{{{2|}}}|<div class="thumbcaption">{{{2}}}</div>}}</div></div>
| <div style="clear:none;text-align:{{#switch: {{{3|}}} | right=right| center=center| left}}"><div class="thumbinner" style="width: {{{4|300}}}px;display: inline-block">{{#ev:youtube|{{{1}}}|{{{4|300}}}}}{{#if:{{{2|}}}|<div class="thumbcaption">{{{2}}}</div>}}</div></div>
| -Youtube ID not defined-}}
| -Youtube ID not defined-}}
</includeonly><noinclude>
</includeonly><noinclude>
Line 9: Line 9:
* videoID: the ID part of the URL. e.g '''a75eG8HG5Fk'''
* videoID: the ID part of the URL. e.g '''a75eG8HG5Fk'''
* caption: (optional) caption below the video
* caption: (optional) caption below the video
* position: (optional, default left) "left" or "right"
* position: (optional, default left) "left", "right" or "center"
* size: (optional, default 300) width in pixels
* size: (optional, default 300) width in pixels


Line 29: Line 29:
| {{Youtube|M1YBZUxMX8g|{{arma3}} trailer|right}}
| {{Youtube|M1YBZUxMX8g|{{arma3}} trailer|right}}
|-
|-
| <nowiki>{{Youtube|EwAxJC9AR_A|{{Name|arma3apex}} trailer|right|400}}</nowiki>
| <nowiki>{{Youtube|EwAxJC9AR_A|{{Name|arma3apex}} trailer|center|400}}</nowiki>
| {{Youtube|EwAxJC9AR_A|{{Name|arma3apex}} trailer|right|400}}
| {{Youtube|EwAxJC9AR_A|{{Name|arma3apex}} trailer|center|400}}
|}
|}


[[Category:Templates]]</noinclude>
[[Category:Templates|{{uc:{{PAGENAME}}}}]]</noinclude>

Revision as of 15:07, 27 December 2020

Shows a YouTube video.

Usage

{{Youtube|videoID|caption|position|size}}

  • videoID: the ID part of the URL. e.g a75eG8HG5Fk
  • caption: (optional) caption below the video
  • position: (optional, default left) "left", "right" or "center"
  • size: (optional, default 300) width in pixels
Examples
Code Result
{{Youtube}} -Youtube ID not defined-
{{Youtube|a75eG8HG5Fk}} a75eG8HG5Fk|300}}
{{Youtube|UgXq6z6-644|{{arma2}} trailer}} UgXq6z6-644|300}}
Arma 2 trailer
{{Youtube|M1YBZUxMX8g|{{arma3}} trailer|right}} M1YBZUxMX8g|300}}
Arma 3 trailer
{{Youtube|EwAxJC9AR_A|{{Name|arma3apex}} trailer|center|400}} EwAxJC9AR_A|400}}
Arma 3 Apex trailer