Badge time.png   The Paragon Wiki Archive documents the state of City of Heroes/Villains as it existed on December 1, 2012.

User:Digitizer/Sandbox

From Paragon Wiki Archive
Revision as of 16:14, 27 April 2007 by Sir Giles (Talk | contribs)

Jump to: navigation, search
<?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;
}
?>