User:Digitizer/Sandbox
<?php
$wgExtensionFunctions[] = 'wfiFrame';
$wgExtensionCredits['parserhook']['iFrame'] = array( 'name' => 'iFrame', 'author' => 'Robert Wagner', 'url' => 'http://www.mediawiki.org/wiki/Extension:iFrame', 'description' => 'you to enbed a iFrame in a wiki page.', );
function wfiFrame() { global $wgParser; $wgParser->setHook( 'iframe', 'RenderiFrame' ); }
function RenderiFrame($input, $argv) { $output = "<IFRAME";
$output .= isset($argv['src']) ? " src=\"" . $argv['src'] . "\"" : ""; $output .= isset($argv['name']) ? " name=\"" . $argv['name'] . "\"" : ""; $output .= isset($argv['scrolling']) ? " scrolling=\"" . $argv['scrolling'] . "\"" : ""; $output .= isset($argv['width']) ? " width=\"" . $argv['width'] . "\"" : ""; $output .= isset($argv['height']) ? " height=\"" . $argv['height'] . "\"" : ""; $output .= isset($argv['frameborder']) ? " frameborder=\"" . $argv['frameborder'] . "\"" : " frameborder=\"0\"";
$output .= "></IFRAME>";
return $output; } ?>