YouTube v2 Plugin

youtubev2 plugin by Jason T
Plugin that creates a link or an embed object of YouTube movie with thumbnails and AJAX.

Provides Syntax.
Compatible with DokuWiki 2007-06-26.

Conflicts with vshare!
Similar to dailymotion, dailymotion_videozap, flashplayer, flowplay, flowplay2, google_video, video, vshare, youtube.

Tagged with embed, flash, movie, video, youtube.

The following security issue was reported for this plugin:

XSS vulnerability allows arbitrary JavaScript insertion. No contact details for the author identified.

It is not recommended to use this plugin until this issue was fixed. Plugin authors should read the plugin security guidelines.

This DokuWiki plugin can do the following by providing a movie ID and some simple syntax:

  1. Create a link to a YouTube video with/without thumbnail(s)
  2. Embed a large video with/without thumbnail(s)
  3. Embed a small video with/without thumbnail(s)

Additionally when you click a thumbnail (if using one) it will hide the thumbnail and then show the video in the same page. Great for that web 2.0 craving you have.

Thanks to Ikuo Obataya for version 1

Usage

  1. For link to a video on YouTube:
    {{youtube>link:MJj5XWQHUFE:numbThumbs}}
  2. For embedding a small video:
    {{youtube>small:MJj5XWQHUFE:numbThumbs}}
  3. For embedding a large video:
    {{youtube>large:MJj5XWQHUFE:numbThumbs}}

Replace “numbThumbs” with the number of image thumbnails you wish to have. Possible values are 0,1,2 (YouTube limits, not mine).

Required Header Code

The following Javascript must be put into the header file (mine is 'main.php), between the

<head></head> tags. This code handles the hiding and displaying of the images/videos.

<script type="text/javascript">
<!--
var clicked=true;
function ExpandCollapse(bExpand,id){
		clicked = bExpand
		_contents="c"+id
		_expand="expand"+id
	if(clicked){
		clicked=false;
		document.getElementById(_contents).style.display = 'block';
	}else{
		clicked=true;
		document.getElementById(_contents).style.display = 'none';
	}	
}
//-->
</script>

Download

YouTube_v2

http://rapidshare.com/files/39711433/youtube.zip.html|YouTube_v2

Download the plugin package and create a directory named 'youtube'. Then extract the plugin into your 'lib/plugins/youtube' directory.

The files in the plugin are:

  1. syntax.php
  2. youtube.png
  3. b_collapse.gif
  4. b_expand.gif

FreeBSD

It is not possible to download this plugin with:

cd /usr/local/www/dokuwiki/lib/plugin
fetch "url_of_youtube_plugin.tgz"
tar xvzf youtube

The above code works with all other plugins, but not with this one, since it is hosted by RapidShare.

Download the file using opera web browser [ed]

Wrong links in the feed

It is better than the v1 because the thumbnails appears in the rss feed, but the links to show and hide video are not set right: they are relatives to the feed.

TJPP

 
plugin/youtubev2.txt · Last modified: 2008/08/10 17:55 by 75.30.238.158
 

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Noncommercial-Share Alike 3.0 Unported

Imprint Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki
WikiForumIRCBugsDarcsXRefTranslate