Make extension compatible with MediaWiki 1.35.
[philipp/winterrodeln/mediawiki_extensions/wrvideo.git] / wrvideo.body.php
index 9be74ab427c12a977d70172865b0dae7fde48fd9..21c9c4689a1d620b575af0ebded6d6a036e0e20c 100644 (file)
@@ -1,4 +1,19 @@
 <?php
+/* This extension embeds a video in a mediawiki page.
+Currently vimeo is supported.
+
+
+To embed the vimeo video
+https://vimeo.com/104778486
+
+the following HTML code has to be inserted into mediawiki:
+<iframe src="//player.vimeo.com/video/104778486?byline=0&amp;portrait=0&amp;color=51735d" width="500" height="281" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>
+
+This extension allows this by the following tag:
+<wrvideo id="104778486" />
+<wrvideo id="104778486" width="500" height="281" />
+*/
+
 
 // WrVideo
 // -------
@@ -45,6 +60,11 @@ class WrVideo {
                return array($doc->saveHTML($doc->firstChild), 'markerType' => 'nowiki');
        }
 
+       public static function ParserFirstCallInitHook(Parser &$parser) {
+               $parser->setHook('wrvideo', 'WrVideo::render');
+               return true;
+       }
+
 }
 
 ?>