X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=plugins%2FMapstraction%2FMapstractionPlugin.php;h=e7240a64497adbe749b48c35cb0c99f2dc6bd923;hb=34995df879457f03ad6f78e617294dc2dd040b7d;hp=93679e56c24496a7abae456048ddd066f62d3284;hpb=a5c11cc92a277c3af6f9b18b1ffaf6dc5f90f5cc;p=quix0rs-gnu-social.git diff --git a/plugins/Mapstraction/MapstractionPlugin.php b/plugins/Mapstraction/MapstractionPlugin.php index 93679e56c2..e7240a6449 100644 --- a/plugins/Mapstraction/MapstractionPlugin.php +++ b/plugins/Mapstraction/MapstractionPlugin.php @@ -47,6 +47,8 @@ if (!defined('STATUSNET')) { class MapstractionPlugin extends Plugin { + const VERSION = STATUSNET_VERSION; + /** provider name, one of: 'cloudmade', 'google', 'microsoft', 'openlayers', 'yahoo' */ public $provider = 'openlayers'; @@ -123,8 +125,8 @@ class MapstractionPlugin extends Plugin $action->script('http://tile.cloudmade.com/wml/0.2/web-maps-lite.js'); break; case 'google': - $action->script(sprintf('http://maps.google.com/maps?file=api&v=2&sensor=false&key=%s', - $this->apikey)); + $action->script(sprintf('http://maps.google.com/maps?file=api&v=2&sensor=false&key=%s', + urlencode($this->apikey))); break; case 'microsoft': $action->script('http://dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=6'); @@ -135,7 +137,7 @@ class MapstractionPlugin extends Plugin break; case 'yahoo': $action->script(sprintf('http://api.maps.yahoo.com/ajaxymap?v=3.8&appid=%s', - $this->apikey)); + urlencode($this->apikey))); break; case 'geocommons': // don't support this yet default: @@ -192,4 +194,17 @@ class MapstractionPlugin extends Plugin $action->elementEnd('div'); } + + function onPluginVersion(&$versions) + { + $versions[] = array('name' => 'Mapstraction', + 'version' => self::VERSION, + 'author' => 'Evan Prodromou', + 'homepage' => 'http://status.net/wiki/Plugin:Mapstraction', + 'rawdescription' => + _m('Show maps of users\' and friends\' notices '. + 'with Mapstraction '. + 'JavaScript library.')); + return true; + } }