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

Difference between revisions of "User:Digitizer/Sandbox"

From Paragon Wiki Archive
Jump to: navigation, search
Line 1: Line 1:
I am trying to figure a way to make an interactive map in wiki much like this one. http://www.justiceforce.com/maps/atlaspark.htm
+
<?php
  
The possibilities look grim unless someone knows a way to introduce client side javascripting on wiki pages.
+
$wgExtensionFunctions[] = 'wfiFrame';
  
{{Table Start}}
+
$wgExtensionCredits['parserhook']['iFrame'] = array(
{{Table Row
+
'name' => 'iFrame',
|Cell1=Name<br>Hospital<br>Tram<br>Neighborhoods<br>Gates<br>Contacts<br>
+
'author' => 'Robert Wagner',
|Cell2=<div style="height:490px; width:628px"><div id="background" style="position:absolute; z-index:0">[[Image:Atlas Park Background.gif]]</div><div id="txt" style="position:absolute; z-index:9;">[[Image:Atlas Park Background Contact Names.gif]]</div></div>}}
+
'url' => 'http://www.mediawiki.org/wiki/Extension:iFrame',
{{Table End}}
+
'description' => 'you to enbed a iFrame in a wiki page.',
 +
);
  
<script language="javascript"></script>
+
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;
 +
}
 +
?>

Revision as of 16:12, 27 April 2007

<?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; } ?>