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 encode($text) { return ''; }
 * 1) Encode the given string so that it will no longer be processed by the wikitext engine

function decode($text) { return preg_replace(           '//esm',            'base64_decode("$1")',            $text        ); }
 * 1) Decode all of the encoded portions of the page

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