blob: 46c83a7fcea2368062864cf47110c856951cd4bb (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
<?
$wgExtensionFunctions[] = "wfGeomapExtension";
function wfGeomapExtension ()
{
global $wgParser ;
$wgParser->setHook ( "geomap" , parse_geomap ) ;
}
function parse_geomap ( $text )
{
global $wgGeomapURL ;
if ( !isset ( $wgGeomapURL ) ) return "" ; # Hide broken extension
$url = $wgGeomapURL ;
# $url = "http://127.0.0.1/extensions/geo/index.php" ;
$url .= "?params=" . urlencode ( $text ) ;
$ret = '
<object data="' . $url . '" width="500" height="500" type="image/svg+xml" border=1>
<embed src="' . $url . '" width="500" height="500" type="image/svg+xml" />
</object>' ;
# $ret = "<iframe width=200 height=200 src=\"{$url}\"/>" ;
return $ret ;
}
?>
|