Extension:Stage6
From MediaWiki.org
|
Release status: beta |
|
|---|---|
| Implementation | Tag |
| Description | Provides tag for embedding Stage6 videos |
| Author(s) | Eduardo Aguilar |
| Last Version | 0.2 (May 24, 2008) |
| MediaWiki | 1.10.0+ |
| License | GPL |
| Download | Stage6.php Code |
| Example | <stage6>1399446</stage6> |
|
check usage (experimental) |
|
A modification of original Extension:YouTube (Iubito)
Contents |
[edit] Purpose
This extension displays videos from Stage6. Upload your videos to Stage6 and then share them in your wiki!
[edit] Installation
- Create a new directory 'Stage6' in your 'extensions' directory.
- Create a file called Stage6.php in your new folder
- Copy and paste the Stage6.php code into your new file
- Add this to your LocalSettings.php, somewhere near the bottom:
require_once('extensions/Stage6/Stage6.php');
[edit] Usage
Stage6 Videos
Tag:
- <stage6>v</stage6>
[edit] Example
- from url http://stage6.divx.com/video/1399446
- <stage6>1399446</stage6>
- with custom width and height:
- <stage6 width="500" height="400">1399446</stage6>
[edit] Stage6.php Code
<?php /** * Stage6 extension - provides tag for embedding Stage6 videos * * @author Eduardo Aguilar * @copyright Copyright © Eduardo Aguilar * @version 0.2 * @link http://www.mediawiki.org/wiki/Extension:Stage6 */ if(!defined('MEDIAWIKI')) { echo("This file is an extension to the MediaWiki software and is not a valid access point"); die(1); } $wgExtensionFunctions[] = 'wfStage6'; $wgExtensionCredits['parserhook'][] = array( 'name' => 'Stage6', 'version' => '0.2', 'description' => 'Display Stage6 video', 'author' => 'Eduardo Aguilar', 'url' => 'http://www.mediawiki.org/wiki/Extension:Stage6' ); function wfStage6() { global $wgParser; $wgParser->setHook('stage6', 'renderStage6'); } # The callback function for converting the input text to HTML output function renderStage6($input, $argv) { $width = isset($argv['width']) ? $argv['width'] : 425; $height = isset($argv['height'])? $argv['height'] : 350; $output = '<object codebase="http://go.divx.com/plugin/DivXBrowserPlugin.cab"' .' height="'.htmlspecialchars($height).'"' .' width="'.htmlspecialchars($width).'"' .' classid="clsid:67DABFBF-D0AB-41fa-9C46-CC0F21721616">' .'<param name="autoplay"' .' value="false">' .'<param name="src"' .' value="http://video.stage6.com/'.htmlspecialchars($input).'/.divx" />' .'<param name="custommode"' .' value="Stage6" />' .'<param name="showpostplaybackad"' .' value="false" />' .'<embed type="video/divx"' .' src="http://video.stage6.com/'.htmlspecialchars($input).'/.divx"' .' pluginspage="http://go.divx.com/plugin/download/"' .' showpostplaybackad="false"' .' custommode="Stage6"' .' autoplay="false"' .' height="'.htmlspecialchars($height).'"' .' width="'.htmlspecialchars($width).'" />' .'</object>'; return $output; }
[edit] Wikis using Stage6
If you use this extension, please add your website here.