Extension:YahooMaps/YahooMaps.php

";	         document.getElementById('result').innerHTML = smart;	          //And copy it to the clipboard in IE	          window.clipboardData.setData("Text", marker);	        }	    }	    function callGeocode {	      var query = document.getElementById("geoquery").value;	      var uri = "http://api.local.yahoo.com/MapsService/V1/geocode?appid={$appId}&location=" + query;	      callWS(uri);	    }		    if (window.XMLHttpRequest) {	      xmlhttp = new XMLHttpRequest;	      xmlhttp.overrideMimeType('text/xml');	    } else if (window.ActiveXObject) {	      xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");	    }    //]]>        Create marker 

ENDGEOCODESCRIPT; return encode($output); }

function getYahooAppId { global $wgYahooMapsAppId; if ($wgYahooMapsAppId==null || $wgYahooMapsAppId=='') { return "YahooDemo"; }	return $wgYahooMapsAppId; }

if (!function_exists('processEncodedOutput')) { $wgHooks['ParserAfterTidy'][] = 'processEncodedOutput'; function processEncodedOutput( &$out, &$text ) { # Find all hidden content and restore to normal $text = decode($text); return true; }
 * 1) Process the page after tidy runs, decoding all encoded portions

# Encode the given string so that it will no longer be processed by the wikitext engine function encode($text) { return '-- ENCODED_CONTENT '.base64_encode($text).' --'; }

# Decode all of the encoded portions of the page function decode($text) { return preg_replace(           	'/-- ENCODED_CONTENT ([0-9a-zA-Z\\+\/]+=*) --/esm',            	'base64_decode("$1")',            	$text        	); } } ?>