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