User:DoubleYou/testpack/Video: Difference between revisions

From Step Mods | Change The Game
(Undo revision 43908 by DoubleYou (talk))
m (Text replace - "http://" to "https://")
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
<includeonly>{{#ifeq: {{{embed}}} | true | {{#ifeq: {{{align}}} | center | <center> |  }}{{#ev:youtube|{{{1}}}|{{{width|360}}}|{{{align|left}}}|{{#if: {{{2|}}} | {{{2}}} | {{{3|}}} }} }} {{clear}}{{#ifeq: {{{align}}} | center | </center> |  }} | {{#tag:hsyoutube|http://www.youtube.com/watch?v={{{1}}}|title={{{2|Video}}}|caption={{{3|}}} }} }}</includeonly><noinclude>
<includeonly>{{#ifeq: {{{embed}}} | true | {{#ifeq: {{{align}}} | center | <center> |  }}{{#ev:youtube|{{{1}}}|{{{width|360}}}|{{{align|left}}}|{{#if: {{{2|}}} | {{{2}}} | {{{3|}}} }} }} {{clear}}{{#ifeq: {{{align}}} | center | </center> |  }} | {{#tag:hsyoutube|https://www.youtube.com/watch?v={{{1}}}|title={{{2|Video}}}|caption={{{3|}}} }} }}</includeonly><noinclude>
 
{{#if: {{{2}}} | {{{2}}} | {{{3|}}} }}


==Usage==
==Usage==
Line 12: Line 10:
*parameter ''align'' (optional), by default left, allows you to set it to align to the right, left, or center of the page (embed video only).
*parameter ''align'' (optional), by default left, allows you to set it to align to the right, left, or center of the page (embed video only).


==Examples==
===Highslide===
'''Code:'''
'''Code:'''
<pre>{{User:DoubleYou/testpack/Video|j4ZQpzf_iAE}}</pre>
<pre>{{User:DoubleYou/testpack/Video|j4ZQpzf_iAE}}</pre>
'''Result:'''<br>
'''Result:'''<br>
{{User:DoubleYou/testpack/Video|j4ZQpzf_iAE}}
{{User:DoubleYou/testpack/Video|j4ZQpzf_iAE}}
 
<br><br>
'''Code:'''
'''Code:'''
<pre>{{User:DoubleYou/testpack/Video|j4ZQpzf_iAE|This is the title|This is the caption}}</pre>
<pre>{{User:DoubleYou/testpack/Video|j4ZQpzf_iAE|This is the title|This is the caption}}</pre>
Line 22: Line 22:
{{User:DoubleYou/testpack/Video|j4ZQpzf_iAE|This is the title|This is the caption}}
{{User:DoubleYou/testpack/Video|j4ZQpzf_iAE|This is the title|This is the caption}}


===Embedded===
'''Code:'''
'''Code:'''
<pre>
<pre>
Line 27: Line 28:
'''Result:'''<br>
'''Result:'''<br>
{{User:DoubleYou/testpack/Video|j4ZQpzf_iAE|embed=true}}
{{User:DoubleYou/testpack/Video|j4ZQpzf_iAE|embed=true}}
 
<br><br>
'''Code:'''
'''Code:'''
<pre>
<pre>

Latest revision as of 06:28, November 2, 2020


Usage

There are two methods Youtube videos can be displayed via this template: highslide link and embedded video.

  • parameter 1 is the Youtube id
  • parameter 2 (optional) 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, left, or center of the page (embed video only).

Examples

Highslide

Code:

{{User:DoubleYou/testpack/Video|j4ZQpzf_iAE}}

Result:

Video



Code:

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

Result:

This is the title

This is the caption

Embedded

Code:

{{User:DoubleYou/testpack/Video|j4ZQpzf_iAE|embed=true}}

Result:



Code:

{{User:DoubleYou/testpack/Video|j4ZQpzf_iAE|This is the caption|embed=true|width=480|align=center}}

Result:

This is the caption