Extension:InteriaVideo
From MediaWiki.org
|
InteriaVideo Release status: unknown |
|
|---|---|
| Implementation | Tag |
| Description | Display Interia Video from interia.pl |
| Author(s) | Michal "Dinth" Gawronski |
| Last version | 1.0 |
| License | No license specified |
| Download | see below |
| Example | Piotr Giza goal with Polonia Warszawa |
|
Check usage (experimental) |
|
InteriaVideo extension allows to display videos from Polish site Video - INTERIA.PL. Upload your videos to Interia and then share them in your wiki!
View a demo at "Piotr Giza goal with Polonia Warszawa" on my wiki.
Based on GoogleVideo extension by Iubito.
[edit] Installation
Add this line at the end of LocalSettings.php:
require_once('extensions/InteriaVideo.php');
Copy the following code into extensions/InteriaVideo.php:
<?php /** * InteriaVideo extension * Tag: * <interiavideo>docid</interiavideo> * Ex: from <script type="text/javascript" src="http://video.interia.pl/player.js#55037,468,376"></script> * <interiavideo>55037,468,376</interiavideo> * * @author Michal "Dinth" Gawronski * @version 1.0 * @link http://www.mediawiki.org/wiki/Extension:InteriaVideo */ $wgExtensionFunctions[] = 'wfInteriaVideo'; // Extension credits that show up on Special:Version $wgExtensionCredits['parserhook'][] = array( 'name' => 'Interia Video', 'version' => '1.0', 'description' => 'Display Interia Video, based on Google Video extension by Sylvain Machefert', 'author' => 'Michal "Dinth" Gawronski', 'url' => 'http://www.mediawiki.org/wiki/Extension:InteriaVideo' ); function wfInteriaVideo() { global $wgParser; $wgParser->setHook('interiavideo', 'renderInteriaVideo'); } # The callback function for converting the input text to HTML output function renderInteriaVideo($input) { $output = '<script type="text/javascript" src="http://video.interia.pl/player.js#'.htmlspecialchars($input).'"></script>'; return $output; }
That's all :-)
[edit] Usage
Usage is as follows: <interiavideo>docid</interiavideo>
