Difference between revisions of "Widget:YouTube"

From Wikispooks
Jump to navigation Jump to search
m (→‎Placing the widget on the page: modify example code)
 
(7 intermediate revisions by 2 users not shown)
Line 4: Line 4:
 
It was created by [http://www.mediawikiwidgets.org/User:Yaron_Koren Yaron Koren].
 
It was created by [http://www.mediawikiwidgets.org/User:Yaron_Koren Yaron Koren].
  
[[Category:Video Widget]]
 
 
== Using this widget ==
 
== Using this widget ==
For information on how to use this widget, see [http://www.mediawikiwidgets.org/YouTube widget description page on MediaWikiWidgets.org].
 
  
== Copy to your site ==
+
Paste the following code <code><nowiki>{{#widget:YouTube|id=xxxxxxxx}}</nowiki></code>
To use this widget on your site, just install [http://www.mediawiki.org/wiki/Extension:Widgets MediaWiki Widgets extension] and copy [{{fullurl:{{FULLPAGENAME}}|action=edit}} full source code] of this page to your wiki as '''{{FULLPAGENAME}}''' article.
+
 
</noinclude><includeonly><object width="425" height="355"><param name="movie" value="http://www.youtube.com/v/<!--{$id|escape:'urlpathinfo'}-->"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/<!--{$id|escape:'urlpathinfo'}-->" type="application/x-shockwave-flash" wmode="transparent" width="425" height="355"></embed></object></includeonly>
+
Default height and width are 420 x 350. Change with additional parameters:
 +
*Height=
 +
*width=
 +
For further information see [http://www.mediawikiwidgets.org/YouTube widget description page on MediaWikiWidgets.org].
 +
 
 +
==Placing the widget on the page==
 +
Use <code>div</code> tags and style statements similar to the following:
 +
 
 +
<code><nowiki><div class="thumb tright"></nowiki><br/>
 +
<nowiki><div class="thumbinner"></nowiki><br/>
 +
<nowiki>{{#widget:YouTube|width=360px|height=300px|id=xxxxxxxxxx}}</nowiki><br/>
 +
<nowiki><div class="thumbcaption">Caption text goes here.</nowiki><br/>
 +
<nowiki></div></div></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>

Latest revision as of 08:55, 6 March 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 the page

Use div tags and style statements similar to the following:

<div class="thumb tright">
<div class="thumbinner">
{{#widget:YouTube|width=360px|height=300px|id=xxxxxxxxxx}}
<div class="thumbcaption">Caption text goes here.
</div></div></div>