Extension:EmbedVideoPlus

The EmbedVideoPlus Extension is a MediaWiki extension which adds a parser function called #evp for embedding video clips from popular video sharing services. EmbedVideoPlus is a fork of Extension:EmbedVideo. I added new features, including caption and align, to the Extension.


 * Project Homepage: EmbedVideoPlus Extension
 * Source Code: EmbedVideoPlus.php
 * Licensing: EmbedVideoPlus is released under The MIT License.

Installation

 * 1) Download EmbedVideoPlus, and be sure to rename the downloaded file to EmbedVideoPlus.php.
 * 2) Drop this script in $IP/extensions
 * Note: $IP is your MediaWiki install directory.
 * 1) Enable the extension by adding this line to the bottom of your LocalSettings.php:

Usage
For example, to embed "http://www.youtube.com/watch?gl=CA&hl=en&v=sfO6JpR5Ip8", you can enter:  

See the output here: http://derakhshani.org/ewiki/Extension:EmbedVideoPlus

The EmbedVideoPlus parser function expects to be called in either of the following ways:
 *  
 *  
 *  </tt>
 *  </tt>

Where:
 * service</tt> is the name of a video sharing service.
 * id</tt> is the id of the video to include
 * description</tt> (optional) is the caption of the video clips.
 * align</tt> (optional) is the align of the video clip in the page (it can be "left" or "right")
 * width</tt> (optional) is the width in pixels of the viewing area (height will be determined automatically)

Supported Services
As of version 0.1, EmbedVideoPlus supports embedding video content from the following services:
 * Dailymotion
 * FunnyOrDie
 * Google Video
 * sevenload
 * Revver
 * YouTube

Developer Notes
The major benefit of using a parser function as the injection mechanism for video clips (as opposed to an extension tag) is that parser functions can utilize template parameters (of the form  </tt>).

For example, say you found yourself making a lot of YouTube videos in thumbnail size, right-aligned like an image. You might make a template called Template:Youtube_tn which could contain this:

And then call it like this: