]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - plugins/Mapstraction/MapstractionPlugin.php
plugins onAutoload now only overloads if necessary (extlibs etc.)
[quix0rs-gnu-social.git] / plugins / Mapstraction / MapstractionPlugin.php
index 54eff205401c47572845db50dfcb3335c073f459..9883650206810d0dc82ea80008a17233a42651d7 100644 (file)
@@ -74,29 +74,6 @@ class MapstractionPlugin extends Plugin
         return true;
     }
 
-    /**
-     * Hook for autoloading classes
-     *
-     * This makes sure our classes get autoloaded from our directory
-     *
-     * @param string $cls name of class being used
-     *
-     * @return boolean event handler return
-     */
-    function onAutoload($cls)
-    {
-        switch ($cls)
-        {
-        case 'AllmapAction':
-        case 'UsermapAction':
-        case 'MapAction':
-            include_once INSTALLDIR.'/plugins/Mapstraction/' . strtolower(mb_substr($cls, 0, -6)) . '.php';
-            return false;
-        default:
-            return true;
-        }
-    }
-
     /**
      * Hook for adding extra JavaScript
      *
@@ -164,7 +141,7 @@ class MapstractionPlugin extends Plugin
                                   ' var user = null; '.
                                   (($actionName == 'showstream') ? ' user = scrapeUser(); ' : '') .
                                   ' var notices = scrapeNotices(user); ' .
-                                 ' var canvas = $("#map_canvas")[0]; ' .
+                                  ' var canvas = $("#map_canvas")[0]; ' .
                                   ' if (typeof(canvas) != "undefined") { showMapstraction(canvas, notices); } '.
                                   '});');
         }
@@ -184,6 +161,7 @@ class MapstractionPlugin extends Plugin
         $action->elementStart('div', array('id' => 'entity_map',
                                          'class' => 'section'));
 
+        // TRANS: Header for Map widget that displays a map with geodata for notices.
         $action->element('h2', null, _m('Map'));
 
         $action->element('div', array('id' => 'map_canvas',
@@ -196,7 +174,7 @@ class MapstractionPlugin extends Plugin
 
         $action->element('a', array('href' => $mapUrl),
                          // TRANS: Clickable item to allow opening the map in full size.
-                         _m("Full size"));
+                         _m('Full size'));
 
         $action->elementEnd('div');
     }
@@ -208,6 +186,7 @@ class MapstractionPlugin extends Plugin
                             'author' => 'Evan Prodromou',
                             'homepage' => 'http://status.net/wiki/Plugin:Mapstraction',
                             'rawdescription' =>
+                            // TRANS: Plugin description.
                             _m('Show maps of users\' and friends\' notices '.
                                'with <a href="http://www.mapstraction.com/">Mapstraction</a>.'));
         return true;