Hooks for: Public group nav in order to place a list-anchor item at

the start or end of the list.
This commit is contained in:
Sarven Capadisli 2009-03-04 05:23:41 +00:00
parent 753b699916
commit 78a715bc37
2 changed files with 23 additions and 14 deletions

View File

@ -88,9 +88,14 @@ StartShowLocalNavBlock: Showing the local nav menu
EndShowLocalNavBlock: At the end of the local nav menu
- $action: the current action
StartShowHTML: Chance to set document content type, charset, language, DOCTYPE and html element properties
StartShowHTML: Chance to set document headers (e.g., content type, charset, language), DOCTYPE and html element properties
- $action: the current action
EndShowHTML: Showing after the html element
- $action: the current action
StartPublicGroupNav: Showing the public group nav menu
- $action: the current action
EndPublicGroupNav: At the end of the public group nav menu
- $action: the current action

View File

@ -39,6 +39,7 @@ require_once INSTALLDIR.'/lib/widget.php';
* @category Output
* @package Laconica
* @author Evan Prodromou <evan@controlyourself.ca>
* @author Sarven Capadisli <csarven@controlyourself.ca>
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
* @link http://laconi.ca/
*
@ -73,6 +74,7 @@ class PublicGroupNav extends Widget
$this->action->elementStart('ul', array('class' => 'nav'));
if (Event::handle('StartPublicGroupNav', array($this))) {
$this->out->menuItem(common_local_url('public'), _('Public'),
_('Public timeline'), $action_name == 'public', 'nav_timeline_public');
@ -90,6 +92,8 @@ class PublicGroupNav extends Widget
$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');
}
}