]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/publicgroupnav.php
define LACONICA and accept LACONICA for backwards compatibility
[quix0rs-gnu-social.git] / lib / publicgroupnav.php
index 8dd97a3b78e1c22cdf3d69a705d6e996b7759dc9..ae9cbdebb491dd8f4c4f97f11f16857c80d33b48 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * Laconica, the distributed open-source microblogging tool
+ * StatusNet, the distributed open-source microblogging tool
  *
  * Menu for public group of actions
  *
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  * @category  Menu
- * @package   Laconica
- * @author    Evan Prodromou <evan@controlyourself.ca>
- * @copyright 2008 Control Yourself, Inc.
+ * @package   StatusNet
+ * @author    Evan Prodromou <evan@status.net>
+ * @copyright 2008 StatusNet, Inc.
  * @license   http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
- * @link      http://laconi.ca/
+ * @link      http://status.net/
  */
 
-if (!defined('LACONICA')) {
+if (!defined('STATUSNET') && !defined('LACONICA')) {
     exit(1);
 }
 
@@ -37,10 +37,11 @@ require_once INSTALLDIR.'/lib/widget.php';
  * Menu for public group of actions
  *
  * @category Output
- * @package  Laconica
- * @author   Evan Prodromou <evan@controlyourself.ca>
+ * @package  StatusNet
+ * @author   Evan Prodromou <evan@status.net>
+ * @author   Sarven Capadisli <csarven@status.net>
  * @license  http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
- * @link     http://laconi.ca/
+ * @link     http://status.net/
  *
  * @see      Widget
  */
@@ -73,20 +74,26 @@ class PublicGroupNav extends Widget
 
         $this->action->elementStart('ul', array('class' => 'nav'));
 
-        $this->out->menuItem(common_local_url('public'), _('Public'),
-            _('Public timeline'), $action_name == 'public', 'nav_timeline_public');
+        if (Event::handle('StartPublicGroupNav', array($this))) {
+            $this->out->menuItem(common_local_url('public'), _('Public'),
+                _('Public timeline'), $action_name == 'public', 'nav_timeline_public');
 
-        $this->out->menuItem(common_local_url('publictagcloud'), _('Recent tags'),
-            _('Recent tags'), $action_name == 'publictagcloud', 'nav_recent-tags');
+            $this->out->menuItem(common_local_url('groups'), _('Groups'),
+                _('User groups'), $action_name == 'groups', 'nav_groups');
 
-        if (count(common_config('nickname', 'featured')) > 0) {
-            $this->out->menuItem(common_local_url('featured'), _('Featured'),
-                _('Featured users'), $action_name == 'featured', 'nav_featured');
-        }
+            $this->out->menuItem(common_local_url('publictagcloud'), _('Recent tags'),
+                _('Recent tags'), $action_name == 'publictagcloud', 'nav_recent-tags');
+
+            if (count(common_config('nickname', 'featured')) > 0) {
+                $this->out->menuItem(common_local_url('featured'), _('Featured'),
+                    _('Featured users'), $action_name == 'featured', 'nav_featured');
+            }
 
-        $this->out->menuItem(common_local_url('favorited'), _('Popular'),
-            _("Popular notices"), $action_name == 'favorited', 'nav_timeline_favorited');
+            $this->out->menuItem(common_local_url('favorited'), _('Popular'),
+                _("Popular notices"), $action_name == 'favorited', 'nav_timeline_favorited');
 
+            Event::handle('EndPublicGroupNav', array($this));
+        }
         $this->action->elementEnd('ul');
     }
 }