X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=include%2Fnav.php;h=511ca07fc0079ef41736260f964bd3883adbcee6;hb=d647dbc6af33689d0baf4bafd72031d06dcf7577;hp=bb1a5b2d814aabd42e1ca812fef790c241dc6157;hpb=d12e2cbfe913529fbca0cc75c4f157ae42db616d;p=friendica.git diff --git a/include/nav.php b/include/nav.php old mode 100644 new mode 100755 index bb1a5b2d81..511ca07fc0 --- a/include/nav.php +++ b/include/nav.php @@ -81,7 +81,7 @@ function nav(&$a) { if(! get_config('system','hide_help')) $nav['help'] = array($help_url, t('Help'), "", t('Help and documentation')); - if($a->apps) + if(count($a->apps)>0) $nav['apps'] = array('apps', t('Apps'), "", t('Addon applications, utilities, games')); $nav['search'] = array('search', t('Search'), "", t('Search site content')); @@ -114,7 +114,11 @@ function nav(&$a) { /* only show friend requests for normal pages. Other page types have automatic friendship. */ if($_SESSION['page_flags'] == PAGE_NORMAL) { - $nav['notifications'] = array('notifications', t('Notifications'), "", t('Friend requests')); + $nav['introductions'] = array('notifications/intros', t('Introductions'), "", t('Friend Requests')); + $nav['notifications'] = array('notifications', t('Notifications'), "", t('Notifications')); + $nav['notifications']['all']=array('notifications/system', t('See all notifications'), "", ""); + $nav['notifications']['mark'] = array('', t('Mark all system notifications seen'), '',''); + } $nav['messages'] = array('message', t('Messages'), "", t('Private mail')); @@ -145,7 +149,7 @@ function nav(&$a) { $banner = get_config('system','banner'); if($banner === false) - $banner .= 'logoFriendika'; + $banner .= 'logoFriendica'; $tpl = get_markup_template('nav.tpl'); @@ -157,8 +161,32 @@ function nav(&$a) { '$banner' => $banner, '$emptynotifications' => t('Nothing new here'), '$userinfo' => $userinfo, + '$sel' => $a->nav_sel, + '$apps' => $a->apps, )); call_hooks('page_header', $a->page['nav']); +} +/* + * Set a menu item in navbar as selected + * + */ +function nav_set_selected($item){ + $a = get_app(); + $a->nav_sel = array( + 'community' => null, + 'network' => null, + 'home' => null, + 'profiles' => null, + 'introductions' => null, + 'notifications' => null, + 'messages' => null, + 'directory' => null, + 'settings' => null, + 'contacts' => null, + 'manage' => null, + 'register' => null, + ); + $a->nav_sel[$item] = 'selected'; }