From e6444adafdd3c50913ca44d8701996e058e064b9 Mon Sep 17 00:00:00 2001 From: Fabio Comuni Date: Mon, 25 Jul 2011 16:52:30 +0200 Subject: change nav selected css class --- include/nav.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/nav.php') diff --git a/include/nav.php b/include/nav.php index 895c321e6..caed9453a 100644 --- a/include/nav.php +++ b/include/nav.php @@ -41,7 +41,7 @@ function nav(&$a) { $nav['logout'] = Array('logout',t('Logout'), "", t('End this session')); } else { - $nav['login'] = Array('login',t('Login'), ($a->module == 'login'?'nav-selected':''), t('Sign in')); + $nav['login'] = Array('login',t('Login'), ($a->module == 'login'?'selected':''), t('Sign in')); } -- cgit v1.2.3 From d12e2cbfe913529fbca0cc75c4f157ae42db616d Mon Sep 17 00:00:00 2001 From: Fabio Comuni Date: Fri, 29 Jul 2011 16:23:47 +0200 Subject: Fix nav template and add missing strings --- include/nav.php | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'include/nav.php') diff --git a/include/nav.php b/include/nav.php index caed9453a..bb1a5b2d8 100644 --- a/include/nav.php +++ b/include/nav.php @@ -37,8 +37,26 @@ function nav(&$a) { * Display login or logout */ + $nav['usermenu']=array(); + $userinfo = null; + if(local_user()) { $nav['logout'] = Array('logout',t('Logout'), "", t('End this session')); + + // user menu + $nav['usermenu'][] = Array('profile/' . $a->user['nickname'], t('Status'), "", t('Your posts and conversations')); + $nav['usermenu'][] = Array('profile/' . $a->user['nickname']. '?tab=profile', t('Profile'), "", t('Your profile page')); + $nav['usermenu'][] = Array('photos/' . $a->user['nickname'], t('Photos'), "", t('Your photos')); + $nav['usermenu'][] = Array('events/', t('Events'), "", t('Your events')); + $nav['usermenu'][] = Array('notes/', t('Personal notes'), "", t('Your personal photos')); + + // user info + $r = q("SELECT micro FROM contact WHERE uid=%d AND self=1", intval($a->user['uid'])); + $userinfo = array( + 'icon' => (count($r) ? $r[0]['micro']: $a->get_baseurl()."/images/default-profile-mm.jpg"), + 'name' => $a->user['username'], + ); + } else { $nav['login'] = Array('login',t('Login'), ($a->module == 'login'?'selected':''), t('Sign in')); @@ -137,6 +155,8 @@ function nav(&$a) { '$sitelocation' => $sitelocation, '$nav' => $nav, '$banner' => $banner, + '$emptynotifications' => t('Nothing new here'), + '$userinfo' => $userinfo, )); call_hooks('page_header', $a->page['nav']); -- cgit v1.2.3 From 07b6c868b3a66efc2737dfc6459b4114fea59ba0 Mon Sep 17 00:00:00 2001 From: fabrixxm Date: Wed, 17 Aug 2011 18:36:24 +0200 Subject: remove javascript to set selectect nav item. enanche img template prefetch ignoring --- include/nav.php | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'include/nav.php') diff --git a/include/nav.php b/include/nav.php index bb1a5b2d8..f9e72bda7 100644 --- a/include/nav.php +++ b/include/nav.php @@ -157,8 +157,28 @@ function nav(&$a) { '$banner' => $banner, '$emptynotifications' => t('Nothing new here'), '$userinfo' => $userinfo, + '$sel' => $a->nav_sel, )); 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, + 'notifications' => null, + 'messages' => null, + 'directyory' => null, + 'settings' => null, + 'contacts' => null, + ); + $a->nav_sel[$item] = 'selected'; } -- cgit v1.2.3 From 5ce6f893a64984eae9685db305b8d29ae3ced509 Mon Sep 17 00:00:00 2001 From: Fabio Comuni Date: Wed, 31 Aug 2011 16:18:03 +0200 Subject: Apps popup menu in navbar --- include/nav.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'include/nav.php') diff --git a/include/nav.php b/include/nav.php index f9e72bda7..b290a8da2 100644 --- 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')); @@ -158,6 +158,7 @@ function nav(&$a) { '$emptynotifications' => t('Nothing new here'), '$userinfo' => $userinfo, '$sel' => $a->nav_sel, + '$apps' => $a->apps, )); call_hooks('page_header', $a->page['nav']); -- cgit v1.2.3 From ffa3b67365741d77b9a21b8505e4661668e6b561 Mon Sep 17 00:00:00 2001 From: Friendika Date: Wed, 28 Sep 2011 23:10:23 -0700 Subject: fix nav-selected duepuntozero --- include/nav.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/nav.php') diff --git a/include/nav.php b/include/nav.php index b290a8da2..16ec941aa 100644 --- a/include/nav.php +++ b/include/nav.php @@ -177,7 +177,7 @@ function nav_set_selected($item){ 'profiles' => null, 'notifications' => null, 'messages' => null, - 'directyory' => null, + 'directory' => null, 'settings' => null, 'contacts' => null, ); -- cgit v1.2.3