Template:Youtube: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
Lou Montana (talk | contribs) (Use YouTube extension (<youtube>) instead of EmbedVideo (obsolete & fork requires PHP 8.0) - default ratio 16/9) |
||
(9 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
<includeonly>{{#if:{{{1|}}} | <includeonly>{{#if:{{{1|}}} | ||
| <div | | <div style="text-align: {{#switch:{{{3|}}}|right=right|center=center|left}}"><div class="thumbinner" style="width: {{{4|300}}}px; display: inline-block">{{#tag:youtube | ||
| -Youtube ID not defined-}} | | {{{1}}} | ||
</includeonly><noinclude> | | height = {{#expr: ({{{4|300}}} * 9/16) round 0}} | ||
| width = {{{4|300}}} | |||
}}{{#if:{{{2|}}}|<div class="thumbcaption">{{{2}}}</div>}}</div></div> | |||
| -Youtube ID not defined- | |||
}}</includeonly><noinclude> | |||
Shows a [https://www.youtube.com YouTube] video. | Shows a [https://www.youtube.com YouTube] video. | ||
Line 9: | Line 13: | ||
* 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 " | * 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 33: | ||
| {{Youtube|M1YBZUxMX8g|{{arma3}} trailer|right}} | | {{Youtube|M1YBZUxMX8g|{{arma3}} trailer|right}} | ||
|- | |- | ||
| <nowiki>{{Youtube|EwAxJC9AR_A|{{Name|arma3apex}} trailer| | | <nowiki>{{Youtube|EwAxJC9AR_A|{{Name|arma3apex}} trailer|center|400}}</nowiki> | ||
| {{Youtube|EwAxJC9AR_A|{{Name|arma3apex}} trailer|center|400}} | | {{Youtube|EwAxJC9AR_A|{{Name|arma3apex}} trailer|center|400}} | ||
|} | |} | ||
[[Category:Templates]]</noinclude> | [[Category:Templates|{{uc:{{PAGENAME}}}}]]</noinclude> |
Latest revision as of 16:05, 26 February 2024
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
Code | Result |
---|---|
{{Youtube}} | -Youtube ID not defined- |
{{Youtube|a75eG8HG5Fk}} | |
{{Youtube|UgXq6z6-644|{{arma2}} trailer}} | |
{{Youtube|M1YBZUxMX8g|{{arma3}} trailer|right}} | |
{{Youtube|EwAxJC9AR_A|{{Name|arma3apex}} trailer|center|400}} |