Difference between revisions of "Widget:YouTube"

From Wikispooks
Jump to navigation Jump to search
m (add help)
m (tweek)
Line 17: Line 17:
  
 
<code><nowiki><div style="float:right;background:#fff; border-style: solid; border-width: 1px;  margin: 1em; padding: 0.4em; margin-right:0px;"></nowiki><br/>
 
<code><nowiki><div style="float:right;background:#fff; border-style: solid; border-width: 1px;  margin: 1em; padding: 0.4em; margin-right:0px;"></nowiki><br/>
<nowiki>{{#widget:YouTube|id=xxxxxxxx}}</nowiki><br/>
+
<nowiki>{{#widget:YouTube|id=xxxxxxxx}}<br/></nowiki><br/>
 
<nowiki>wikitext-text caption about the video</nowiki><br/>
 
<nowiki>wikitext-text caption about the video</nowiki><br/>
 
<nowiki></div> </nowiki></code>
 
<nowiki></div> </nowiki></code>
  
 
</noinclude><includeonly><iframe width="<!--{$width|escape:'html'|default:'425'}-->" height="<!--{$height|escape:'html'|default:355}-->" src="https://www.youtube.com/embed/<!--{if isset($playlist)}-->?listType=playlist&list=<!--{$playlist|escape:'urlpathinfo'}--><!--{else}--><!--{$id|escape:'urlpathinfo'}--><!--{/if}-->" frameborder="0" allowfullscreen></iframe></includeonly>
 
</noinclude><includeonly><iframe width="<!--{$width|escape:'html'|default:'425'}-->" height="<!--{$height|escape:'html'|default:355}-->" src="https://www.youtube.com/embed/<!--{if isset($playlist)}-->?listType=playlist&list=<!--{$playlist|escape:'urlpathinfo'}--><!--{else}--><!--{$id|escape:'urlpathinfo'}--><!--{/if}-->" frameborder="0" allowfullscreen></iframe></includeonly>

Revision as of 09:30, 25 January 2014

This widget allows you to add YouTube video player to your wiki page.

It was created by Yaron Koren.

Using this widget

Paste the following code {{#widget:YouTube|id=xxxxxxxx}}

Default height and width are 420 x 350. Change with additional parameters:

  • Height=
  • width=

For further information see widget description page on MediaWikiWidgets.org.

Placing the widget on ta page

Use div tags and style statements similar to the following:

<div style="float:right;background:#fff; border-style: solid; border-width: 1px; margin: 1em; padding: 0.4em; margin-right:0px;">
{{#widget:YouTube|id=xxxxxxxx}}<br/>
wikitext-text caption about the video
</div>