Widget:YouTube: Difference between revisions

From Halopedia, the Halo wiki

No edit summary
No edit summary
Line 3: Line 3:
<div class="autoResize<!--{if isset($gallery)}--> gallerybox<!--{/if}--><!--{if isset($thumb)}--> thumbinner<!--{/if}-->" style="width:<!--{if isset($width)}--><!--{($width+2)|escape:'html'|string_format:"%d"}--><!--{else if isset($height)}--><!--{($height*(16/9)+3)|string_format:"%d"}--><!--{else if isset($thumb)}-->202<!--{else}-->560<!--{/if}-->px;<!--{if isset($center)}--> margin:0 auto;<!--{/if}-->">
<div class="autoResize<!--{if isset($gallery)}--> gallerybox<!--{/if}--><!--{if isset($thumb)}--> thumbinner<!--{/if}-->" style="width:<!--{if isset($width)}--><!--{($width+2)|escape:'html'|string_format:"%d"}--><!--{else if isset($height)}--><!--{($height*(16/9)+3)|string_format:"%d"}--><!--{else if isset($thumb)}-->202<!--{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)+1)|string_format:"%d"}--><!--{else if isset($thumb)}-->200<!--{else}-->560<!--{/if}-->" height="<!--{if isset($height)}--><!--{$height|escape:'html'|string_format:"%d"}--><!--{else if isset($width)}--><!--{($width*(9/16))|string_format:"%d"}--><!--{else if isset($thumb)}-->112<!--{else}-->315<!--{/if}-->" src="https://www.youtube.com/embed/<!--{$id|escape:'url'}-->?<!--{if isset($playlist)}-->list=<!--{$playlist|escape:'url'}-->&amp;<!--{/if}--><!--{if isset($start)}-->start=<!--{$start|escape:'url'|string_format:"%d"}-->&amp;<!--{/if}--><!--{if isset($end)}-->end=<!--{$end|escape:'url'|string_format:"%d"}--><!--{/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)+1)|string_format:"%d"}--><!--{else if isset($thumb)}-->200<!--{else}-->560<!--{/if}-->" height="<!--{if isset($height)}--><!--{$height|escape:'html'|string_format:"%d"}--><!--{else if isset($width)}--><!--{($width*(9/16))|string_format:"%d"}--><!--{else if isset($thumb)}-->112<!--{else}-->315<!--{/if}-->" src="https://www.youtube.com/embed/<!--{$id|escape:'url'}-->?<!--{if isset($playlist)}-->list=<!--{$playlist|escape:'url'}-->&amp;<!--{/if}--><!--{if isset($start)}-->start=<!--{$start|escape:'url'|string_format:"%d"}-->&amp;<!--{/if}--><!--{if isset($end)}-->end=<!--{$end|escape:'url'|string_format:"%d"}--><!--{/if}-->" frameborder="0" allowfullscreen></iframe>
<!--{if isset($thumb) || isset($caption)}--><div class="thumbcaption<!--{if isset($gallery)}--> gallerytext<!--{/if}-->"><!--{if isset($thumb)}--><div class="magnify"><a href="https://www.youtube.com/watch?<!--{if isset($playlist)}-->list=<!--{$playlist|escape:'url'}-->&amp;<!--{/if}-->v=<!--{$id|escape:'url'}-->" class="internal" title="Enlarge" target="_blank"></a></div><!--{/if}--><!--{if isset($caption)}--><!--{if isset($gallery)}--><p><!--{/if}--><!--{$caption|escape:'html'}--><!--{if isset($gallery)}--></p><!--{/if}--><!--{/if}--></div><!--{/if}-->
<!--{if isset($thumb) || isset($caption)}--><div class="thumbcaption" style="<!--{if isset($gallery)}-->font-size:94%;word-wrap:break-word;overflow:hidden;padding:2px 4px;<!--{/if}-->"><!--{if isset($thumb)}--><div class="magnify"><a href="https://www.youtube.com/watch?<!--{if isset($playlist)}-->list=<!--{$playlist|escape:'url'}-->&amp;<!--{/if}-->v=<!--{$id|escape:'url'}-->" class="internal" title="Enlarge" target="_blank"></a></div><!--{/if}--><!--{if isset($caption)}--><!--{if isset($gallery)}--><p><!--{/if}--><!--{$caption|escape:'html'}--><!--{if isset($gallery)}--></p><!--{/if}--><!--{/if}--></div><!--{/if}-->
</div></div><!--{else}--><p style="color:red">No <b>id</b> provided for the YouTube widget!</p><!--{/if}--></includeonly>
</div></div><!--{else}--><p style="color:red">No <b>id</b> provided for the YouTube widget!</p><!--{/if}--></includeonly>

Revision as of 17:43, September 28, 2022

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