X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=lib%2Fpublicgroupnav.php;h=bd2ad5312419467b243090491019e49e8415db05;hb=4cdb3e64ccd98953dc4477aa2ca9f0bcab7fcec6;hp=8dd97a3b78e1c22cdf3d69a705d6e996b7759dc9;hpb=4b9df58c90e25ea79aeec64c6e96f828fe06d7df;p=quix0rs-gnu-social.git diff --git a/lib/publicgroupnav.php b/lib/publicgroupnav.php index 8dd97a3b78..bd2ad53124 100644 --- a/lib/publicgroupnav.php +++ b/lib/publicgroupnav.php @@ -1,6 +1,6 @@ . * * @category Menu - * @package Laconica - * @author Evan Prodromou - * @copyright 2008 Control Yourself, Inc. + * @package StatusNet + * @author Evan Prodromou + * @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,30 +37,17 @@ require_once INSTALLDIR.'/lib/widget.php'; * Menu for public group of actions * * @category Output - * @package Laconica - * @author Evan Prodromou + * @package StatusNet + * @author Evan Prodromou + * @author Sarven Capadisli * @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 */ -class PublicGroupNav extends Widget +class PublicGroupNav extends Menu { - var $action = null; - - /** - * Construction - * - * @param Action $action current action, used for output - */ - - function __construct($action=null) - { - parent::__construct($action); - $this->action = $action; - } - /** * Show the menu * @@ -73,20 +60,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'); - $this->out->menuItem(common_local_url('favorited'), _('Popular'), - _("Popular notices"), $action_name == 'favorited', 'nav_timeline_favorited'); + 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'); + + Event::handle('EndPublicGroupNav', array($this)); + } $this->action->elementEnd('ul'); } }