Widget:YouTube: Difference between revisions

From the Kingdom Hearts Wiki, the Kingdom Hearts encyclopedia
Jump to navigationJump to search
No edit summary
No edit summary
Line 1: Line 1:
<noinclude>This widget allows you to embed YouTube videos. Accepted parameters: '''id''' (required), '''playlist''', '''start''', '''end''', '''width''', '''height''', '''thumb''', '''left''', '''right''', '''center''', '''caption'''.</noinclude><includeonly><!--{if isset($id)}-->
<noinclude>This widget allows you to embed YouTube videos. Accepted parameters: '''id''' (required), '''playlist''', '''start''', '''end''', '''width''', '''height''', '''thumb''', '''left''', '''right''', '''center''', '''caption'''.</noinclude><includeonly><!--{if isset($id)}-->
<div class="videoWidget<!--{if isset($thumb)}--> thumb<!--{/if}--><!--{if isset($right) || (isset($thumb) && !isset($left) && !isset($center))}--> tright<!--{else if isset($left)}--> tleft<!--{/if}-->">
<div class="videoWidget<!--{if isset($thumb)}--> thumb<!--{/if}--><!--{if isset($right) || (isset($thumb) && !isset($left) && !isset($center))}--> tright<!--{else if isset($left)}--> tleft<!--{/if}-->" style="display:inline-block;">
<div class="autoResize<!--{if isset($thumb)}--> thumbinner<!--{/if}-->" style="width:<!--{if isset($width)}--><!--{($width|escape:'html')|string_format:"%d"}--><!--{else if isset($height)}--><!--{($height*(16/9)+0.5)|string_format:"%d"}--><!--{else if isset($thumb)}-->250<!--{else}-->560<!--{/if}-->px;<!--{if isset($center)}--> margin:0 auto;<!--{/if}-->">
<div class="autoResize<!--{if isset($thumb)}--> thumbinner<!--{/if}-->" style="width:<!--{if isset($width)}--><!--{($width|escape:'html')|string_format:"%d"}--><!--{else if isset($height)}--><!--{($height*(16/9)+0.5)|string_format:"%d"}--><!--{else if isset($thumb)}-->250<!--{else}-->560<!--{/if}-->px;<!--{if isset($center)}--> margin:0 auto;<!--{/if}-->">
<iframe class="<!--{if isset($thumb)}-->thumbimage<!--{/if}-->" style="<!--{if isset($thumb)}-->display:block;<!--{/if}-->" width="<!--{if isset($width)}--><!--{($width|escape:'html')|string_format:"%d"}--><!--{else if isset($height)}--><!--{($height*(16/9)+0.5)|string_format:"%d"}--><!--{else if isset($thumb)}-->250<!--{else}-->560<!--{/if}-->" height="<!--{if isset($height)}--><!--{($height|escape:'html')|string_format:"%d"}--><!--{else if isset($width)}--><!--{($width*(9/16)+0.5)|string_format:"%d"}--><!--{else if isset($thumb)}-->141<!--{else}-->315<!--{/if}-->" src="https://www.youtube.com/embed/<!--{$id|escape:'url'}-->?<!--{if isset($playlist)}-->list=<!--{$playlist|escape:'url'}-->&<!--{/if}--><!--{if isset($start)}-->start=<!--{$start|escape:'url'}-->&<!--{/if}--><!--{if isset($end)}-->end=<!--{$end|escape:'url'}--><!--{/if}-->" frameborder="0" allowfullscreen></iframe>
<iframe class="<!--{if isset($thumb)}-->thumbimage<!--{/if}-->" style="<!--{if isset($thumb)}-->display:block;<!--{/if}-->" width="<!--{if isset($width)}--><!--{($width|escape:'html')|string_format:"%d"}--><!--{else if isset($height)}--><!--{($height*(16/9)+0.5)|string_format:"%d"}--><!--{else if isset($thumb)}-->250<!--{else}-->560<!--{/if}-->" height="<!--{if isset($height)}--><!--{($height|escape:'html')|string_format:"%d"}--><!--{else if isset($width)}--><!--{($width*(9/16)+0.5)|string_format:"%d"}--><!--{else if isset($thumb)}-->141<!--{else}-->315<!--{/if}-->" src="https://www.youtube.com/embed/<!--{$id|escape:'url'}-->?<!--{if isset($playlist)}-->list=<!--{$playlist|escape:'url'}-->&<!--{/if}--><!--{if isset($start)}-->start=<!--{$start|escape:'url'}-->&<!--{/if}--><!--{if isset($end)}-->end=<!--{$end|escape:'url'}--><!--{/if}-->" frameborder="0" allowfullscreen></iframe>
<!--{if isset($thumb) || isset($caption)}--><div class="thumbcaption"><!--{if isset($thumb)}--><div class="magnify"><a href="https://www.youtube.com/watch?<!--{if isset($playlist)}-->list=<!--{$playlist|escape:'url'}-->&<!--{/if}-->v=<!--{$id|escape:'url'}-->" class="internal" title="Enlarge" target="_blank"></a></div><!--{/if}--><!--{if isset($caption)}--><!--{$caption|escape:'html'}--><!--{/if}--></div><!--{/if}-->
<!--{if isset($thumb) || isset($caption)}--><div class="thumbcaption"><!--{if isset($thumb)}--><div class="magnify"><a href="https://www.youtube.com/watch?<!--{if isset($playlist)}-->list=<!--{$playlist|escape:'url'}-->&<!--{/if}-->v=<!--{$id|escape:'url'}-->" class="internal" title="Enlarge" target="_blank"></a></div><!--{/if}--><!--{if isset($caption)}--><!--{$caption|escape:'html'}--><!--{/if}--></div><!--{/if}-->
</div></div><!--{else}--><p style="color: red;">No <b>id</b> provided for the YouTube widget!</p><!--{/if}-->
</div></div><!--{else}--><p style="color:red;">No <b>id</b> provided for the YouTube widget!</p><!--{/if}-->
</includeonly>
</includeonly>

Revision as of 20:40, 22 January 2019

This widget allows you to embed YouTube videos. Accepted parameters: id (required), playlist, start, end, width, height, thumb, left, right, center, caption.