Difference between revisions of "Template:Youtube"

34 bytes removed ,  22:52, September 15, 2020
currently isnt working but i'll go ask tech
(remove {{void}})
(currently isnt working but i'll go ask tech)
Line 1: Line 1:
<includeonly>{|style="margin: 0.5em; margin-top:0 !important; padding: 3px 0 3px 0 !important; margin-{{#switch:{{{3|}}}| =left|left=left|right=right|center=center|#default=left}}:0 !important; background-color:#FFF; border: 2px solid #7F5F00;width:100px;float:{{#switch:{{{3|}}}| =left|left=left|right=right|center=center|#default=left}}"
<includeonly>{|style="margin: 0.5em; margin-top:0 !important; padding: 3px 0 3px 0 !important; margin-{{#switch:{{{3|}}}| =left|left=left|right=right|center=center|#default=left}}:0 !important; background-color:#FFF; border: 2px solid #7F5F00;width:100px;float:{{#switch:{{{3|}}}| =left|left=left|right=right|center=center|#default=left}}"
|<div>
|<div>
|{{#ev:youtube|{{{1}}}|{{#ifeq:{{{2|}}}| |250|{{{2|}}}}}}}{{#switch:{{{3|}}}| ={{#ifeq:{{{4|}}}| | |<br/>{{{4|}}}}}|left={{#ifeq:{{{4|}}}| | |<br/>{{{4|}}}}}|right={{#ifeq:{{{4|}}}| | |<br/>{{{4|}}}}}|center={{#ifeq:{{{4|}}}| | |<br/>{{{4|}}}}}|#default={{#ifeq:{{{3|}}}| | |<br/>{{{3|}}}}}}}
|{{#ev:youtube|{{{1}}}|{{#ifeq:{{{2|}}}||250|{{{2|}}}}}}}{{#switch:{{{3|}}}| ={{#ifeq:{{{4|}}}|| |<br/>{{{4|}}}}}|left={{#ifeq:{{{4|}}}|| |<br/>{{{4|}}}}}|right={{#ifeq:{{{4|}}}|| |<br/>{{{4|}}}}}|center={{#ifeq:{{{4|}}}|| |<br/>{{{4|}}}}}|#default={{#ifeq:{{{3|}}}|| |<br/>{{{3|}}}}}}}
|</div>
|</div>
|}</includeonly><noinclude>
|}</includeonly><noinclude>
==Purpose==
This template is for conveniently displaying YouTube videos on an article.
This template is for conveniently displaying Youtube videos on an article.


==Usage==
==Usage==
Line 12: Line 11:


Where:
Where:
*'''''Video code''''' is the unique sequence of letters, numbers, and characters that point to the video.
*'''Video code''' is the unique sequence of letters, numbers, and characters that point to the video.
*'''''Video size''''' is the desired size of the video. Defaults to 250 pixels.
*'''Video size''' is the desired size of the video. Defaults to 250 pixels.
*'''''Alignment''''' is where to have the video. (i.e. right, left, or center.) Defaults to left if blank.
*'''Alignment''' is where to have the video. (i.e. right, left, or center.) Defaults to left if blank.
*'''''Caption''''' is an optional caption to describe the video.
*'''Caption''' is an optional caption to describe the video.
**If ''location'' is neither '''left''', '''right''', nor '''center''', then the it is assumed to be a caption and the video's location is set to "left".
**If ''location'' is neither '''left''', '''right''', nor '''center''', then the it is assumed to be a caption and the video's location is set to "left".


[[Category:Formatting templates]]
[[Category:Formatting templates]]
</noinclude>
</noinclude>
15,584

edits