forked from GNUsocial/gnu-social
Add an even (hook): StartPersonalGroupNav.
This commit is contained in:
parent
a4238e97d7
commit
ed05569716
@ -93,43 +93,45 @@ class PersonalGroupNav extends Widget
|
|||||||
|
|
||||||
$this->out->elementStart('ul', array('class' => 'nav'));
|
$this->out->elementStart('ul', array('class' => 'nav'));
|
||||||
|
|
||||||
$this->out->menuItem(common_local_url('all', array('nickname' =>
|
if (Event::handle('StartPersonalGroupNav', array($this))) {
|
||||||
$nickname)),
|
$this->out->menuItem(common_local_url('all', array('nickname' =>
|
||||||
_('Personal'),
|
$nickname)),
|
||||||
sprintf(_('%s and friends'), (($user_profile && $user_profile->fullname) ? $user_profile->fullname : $nickname)),
|
_('Personal'),
|
||||||
$action == 'all', 'nav_timeline_personal');
|
sprintf(_('%s and friends'), (($user_profile && $user_profile->fullname) ? $user_profile->fullname : $nickname)),
|
||||||
$this->out->menuItem(common_local_url('replies', array('nickname' =>
|
$action == 'all', 'nav_timeline_personal');
|
||||||
$nickname)),
|
$this->out->menuItem(common_local_url('replies', array('nickname' =>
|
||||||
_('Replies'),
|
$nickname)),
|
||||||
sprintf(_('Replies to %s'), (($user_profile && $user_profile->fullname) ? $user_profile->fullname : $nickname)),
|
_('Replies'),
|
||||||
$action == 'replies', 'nav_timeline_replies');
|
sprintf(_('Replies to %s'), (($user_profile && $user_profile->fullname) ? $user_profile->fullname : $nickname)),
|
||||||
$this->out->menuItem(common_local_url('showstream', array('nickname' =>
|
$action == 'replies', 'nav_timeline_replies');
|
||||||
$nickname)),
|
$this->out->menuItem(common_local_url('showstream', array('nickname' =>
|
||||||
_('Profile'),
|
$nickname)),
|
||||||
($user_profile && $user_profile->fullname) ? $user_profile->fullname : $nickname,
|
_('Profile'),
|
||||||
$action == 'showstream', 'nav_profile');
|
($user_profile && $user_profile->fullname) ? $user_profile->fullname : $nickname,
|
||||||
$this->out->menuItem(common_local_url('showfavorites', array('nickname' =>
|
$action == 'showstream', 'nav_profile');
|
||||||
$nickname)),
|
$this->out->menuItem(common_local_url('showfavorites', array('nickname' =>
|
||||||
_('Favorites'),
|
$nickname)),
|
||||||
sprintf(_('%s\'s favorite notices'), ($user_profile) ? $user_profile->getBestName() : _('User')),
|
_('Favorites'),
|
||||||
$action == 'showfavorites', 'nav_timeline_favorites');
|
sprintf(_('%s\'s favorite notices'), ($user_profile) ? $user_profile->getBestName() : _('User')),
|
||||||
|
$action == 'showfavorites', 'nav_timeline_favorites');
|
||||||
|
|
||||||
$cur = common_current_user();
|
$cur = common_current_user();
|
||||||
|
|
||||||
if ($cur && $cur->id == $user->id) {
|
if ($cur && $cur->id == $user->id) {
|
||||||
|
|
||||||
$this->out->menuItem(common_local_url('inbox', array('nickname' =>
|
$this->out->menuItem(common_local_url('inbox', array('nickname' =>
|
||||||
$nickname)),
|
$nickname)),
|
||||||
_('Inbox'),
|
_('Inbox'),
|
||||||
_('Your incoming messages'),
|
_('Your incoming messages'),
|
||||||
$action == 'inbox');
|
$action == 'inbox');
|
||||||
$this->out->menuItem(common_local_url('outbox', array('nickname' =>
|
$this->out->menuItem(common_local_url('outbox', array('nickname' =>
|
||||||
$nickname)),
|
$nickname)),
|
||||||
_('Outbox'),
|
_('Outbox'),
|
||||||
_('Your sent messages'),
|
_('Your sent messages'),
|
||||||
$action == 'outbox');
|
$action == 'outbox');
|
||||||
|
}
|
||||||
|
Event::handle('EndPersonalGroupNav', array($this));
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->out->elementEnd('ul');
|
$this->out->elementEnd('ul');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user