]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - plugins/TagSub/tagsubmenu.php
More info for a proper, fancy-url lighttpd setup
[quix0rs-gnu-social.git] / plugins / TagSub / tagsubmenu.php
index 44770651d93047b3750a380c885a5ff5bbbbb14d..01fa372dd9bdcf858bfbc65c4f0b50fe069f0bde 100644 (file)
@@ -4,7 +4,7 @@
  * Copyright (C) 2011, StatusNet, Inc.
  *
  * Menu to show tags you're subscribed to
- * 
+ *
  * PHP version 5
  *
  * This program is free software: you can redistribute it and/or modify
@@ -44,8 +44,7 @@ if (!defined('STATUSNET')) {
  * @license   http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPL 3.0
  * @link      http://status.net/
  */
-
-class TagSubMenu extends Menu
+class TagSubMenu extends MoreMenu
 {
     protected $user;
     protected $tags;
@@ -57,20 +56,33 @@ class TagSubMenu extends Menu
         $this->tags = $tags;
     }
 
-    function show()
+    function getItems()
     {
-        $this->out->elementStart('ul', array('class' => 'nav'));
-
-        foreach ($tags as $tag) {
-                $this->out->menuItem(common_local_url('tag',
-                                                      array('tag' => $tag)),
-                                     sprintf('#%s', $tag),
-                                     sprintf(_('Notices tagged with %s'), $tag),
-                                     $this->actionName == 'tag' && $this->action->arg('tag') == $tag,
-                                     'nav_streams_tag_'.$tag);
+        $items = array();
+        
+        foreach ($this->tags as $tag) {
+            if (!empty($tag)) {
+                $items[] = array('tag',
+                                 array('tag' => $tag),
+                                 sprintf('#%s', $tag),
+                                 // TRANS: Menu item title. %s is a tag.
+                                 sprintf(_('Notices tagged with "%s".'), $tag));
+            }
         }
 
-        $this->out->elementEnd('ul');
+        return $items;
+    }
+
+    function tag()
+    {
+        return 'tagsubs';
     }
     
+    function seeAllItem()
+    {
+        return array('tagsubs',
+                     array('nickname' => $this->user->nickname),
+                     _('See all'),
+                     _('See all tags you are following'));
+    }
 }