User:DoubleYou/testpack/Video: Difference between revisions

From Step Mods | Change The Game
No edit summary
No edit summary
Line 1: Line 1:
<includeonly>{{#ifeq: {{{embed}}} | true | {{#ev:youtube|{{{1}}}|{{{width|360}}}|{{{align|left}}}|{{{3|}}} }} {{clear}} | {{#tag:hsyoutube|http://www.youtube.com/watch?v={{{1}}}|title={{{2}}}|caption={{{3|}}} }} }}</includeonly><noinclude>
<includeonly>{{#ifeq: {{{embed}}} | true | {{#ev:youtube|{{{1}}}|{{{width|360}}}|{{{align|left}}}|{{{3|}}} }} {{clear}} | {{#tag:hsyoutube|http://www.youtube.com/watch?v={{{1}}}|title={{{2}}}|caption={{{3|}}} }} }}</includeonly><noinclude>
==Usage Examples==
==Usage==
This template displays a Youtube video link using the Highslide plugin.<br>
This template displays a Youtube video link using the Highslide plugin.<br>
''parameter 1'' is the Youtube id<br>
''parameter 1'' is the Youtube id<br>
''parameter 2'' is the title<br>
''parameter 2'' is the title<br>
''parameter 3'' is the caption<br>
''parameter 3'' (optional) is the caption<br>
parameter ''embed'' (optional) if set to true will embed the video instead of link to it with highslide. Please note that embedded videos will not display your specified title currently. <br>
parameter ''width'' (optional), by default, is set to 360 is in pixels how wide it should display (embed video only). <br>
parameter ''align'' (optional), by default left, allows you to set it to align to the right or to the left of the page (embed video only). <br>
'''Code:'''
'''Code:'''
<pre>
<pre>
Line 13: Line 16:
'''Code:'''
'''Code:'''
<pre>
<pre>
{{User:DoubleYou/testpack/Video|j4ZQpzf_iAE|This is the title|This is the caption|embed=true|width=480|align=left}}</pre>
{{User:DoubleYou/testpack/Video|j4ZQpzf_iAE|This title will not display|This is the caption|embed=true|width=480|align=left}}</pre>
'''Result:'''<br>
'''Result:'''<br>
{{User:DoubleYou/testpack/Video|j4ZQpzf_iAE|This is the title|This is the caption|embed=true|width=480|align=left}}
{{User:DoubleYou/testpack/Video|j4ZQpzf_iAE|This title will not display|This is the caption|embed=true|width=480|align=left}}
</noinclude>
</noinclude>

Revision as of 04:48, August 22, 2014

Usage

This template displays a Youtube video link using the Highslide plugin.
parameter 1 is the Youtube id
parameter 2 is the title
parameter 3 (optional) is the caption
parameter embed (optional) if set to true will embed the video instead of link to it with highslide. Please note that embedded videos will not display your specified title currently.
parameter width (optional), by default, is set to 360 is in pixels how wide it should display (embed video only).
parameter align (optional), by default left, allows you to set it to align to the right or to the left of the page (embed video only).
Code:

{{User:DoubleYou/testpack/Video|j4ZQpzf_iAE|This is the title|This is the caption}}

Result:

This is the title

This is the caption


Code:

{{User:DoubleYou/testpack/Video|j4ZQpzf_iAE|This title will not display|This is the caption|embed=true|width=480|align=left}}

Result:

This is the caption