]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - plugins/TagSub/TagSubPlugin.php
Put text content into Favorite activities/activityobjects
[quix0rs-gnu-social.git] / plugins / TagSub / TagSubPlugin.php
index ba1cff6673a0fb7ea580453ed9beeec1f76bd7d2..1c493de0cd5e04e9540c381a1246b0869911258c 100644 (file)
@@ -60,35 +60,6 @@ class TagSubPlugin extends Plugin
         return true;
     }
 
-    /**
-     * Load related modules when needed
-     *
-     * @param string $cls Name of the class to be loaded
-     *
-     * @return boolean hook value; true means continue processing, false means stop.
-     */
-    function onAutoload($cls)
-    {
-        $dir = dirname(__FILE__);
-
-        switch ($cls)
-        {
-        case 'TagSub':
-            include_once $dir.'/'.$cls.'.php';
-            return false;
-        case 'TagsubAction':
-        case 'TagunsubAction':
-        case 'TagsubsAction':
-        case 'TagSubForm':
-        case 'TagSubMenu':
-        case 'TagUnsubForm':
-            include_once $dir.'/'.strtolower($cls).'.php';
-            return false;
-        default:
-            return true;
-        }
-    }
-
     /**
      * Map URLs to actions
      *
@@ -192,7 +163,6 @@ class TagSubPlugin extends Plugin
      *
      * @return boolean hook return
      */
-
     function onEndSubGroupNav($widget)
     {
         $action = $widget->out;
@@ -208,39 +178,6 @@ class TagSubPlugin extends Plugin
         return true;
     }
 
-    /**
-     * Add a count of mirrored feeds into a user's profile sidebar stats.
-     *
-     * @param Profile $profile
-     * @param array $stats
-     * @return boolean hook return value
-     */
-    function onProfileStats($profile, &$stats)
-    {
-        $cur = common_current_user();
-        if (!empty($cur) && $cur->id == $profile->id) {
-            $tagsub = new TagSub();
-            $tagsub->profile_id = $profile->id;
-            $entry = array(
-                'id' => 'tagsubs',
-                'label' => _m('Tag subscriptions'),
-                'link' => common_local_url('tagsubs', array('nickname' => $profile->nickname)),
-                'value' => $tagsub->count(),
-            );
-
-            $insertAt = count($stats);
-            foreach ($stats as $i => $row) {
-                if ($row['id'] == 'groups') {
-                    // Slip us in after them.
-                    $insertAt = $i + 1;
-                    break;
-                }
-            }
-            array_splice($stats, $insertAt, 0, array($entry));
-        }
-        return true;
-    }
-
     function onEndDefaultLocalNav($menu, $user)
     {
         $user = common_current_user();
@@ -251,11 +188,11 @@ class TagSubPlugin extends Plugin
 
             if (!empty($tags) && count($tags) > 0) {
                 $tagSubMenu = new TagSubMenu($menu->out, $user, $tags);
+                // TRANS: Menu item text for tags submenu.
                 $menu->submenu(_m('Tags'), $tagSubMenu);
             }
         }
 
         return true;
     }
-
 }