]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - plugins/Mapstraction/MapstractionPlugin.php
Added missing position paramater
[quix0rs-gnu-social.git] / plugins / Mapstraction / MapstractionPlugin.php
index ba7827151b32c5dde0c5544617f74aea892e5f27..868933fd432461a887c0697c1d1681a1ab6d4a6e 100644 (file)
@@ -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';
@@ -158,7 +160,6 @@ class MapstractionPlugin extends Plugin
                                   ' var user = null; '.
                                   (($actionName == 'showstream') ? ' user = scrapeUser(); ' : '') .
                                   ' var notices = scrapeNotices(user); ' .
-                                  ' console.log(notices); ' .
                                   ' showMapstraction($("#map_canvas"), notices); '.
                                   '});');
         }
@@ -178,7 +179,7 @@ class MapstractionPlugin extends Plugin
         $action->elementStart('div', array('id' => 'entity_map',
                                          'class' => 'section'));
 
-        $action->element('h2', null, _('Map'));
+        $action->element('h2', null, _m('Map'));
 
         $action->element('div', array('id' => 'map_canvas',
                                     'class' => 'gray smallmap',
@@ -189,8 +190,21 @@ class MapstractionPlugin extends Plugin
                                     array('nickname' => $action->trimmed('nickname')));
 
         $action->element('a', array('href' => $mapUrl),
-                         _("Full size"));
+                         _m("Full size"));
 
         $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 <a href="http://www.mapstraction.com/">Mapstraction</a> '.
+                               'JavaScript library.'));
+        return true;
+    }
 }