From 7536ed6e449e0d405394155b50f5e1ce96fd7776 Mon Sep 17 00:00:00 2001 From: friendica Date: Thu, 28 Nov 2013 20:17:07 -0800 Subject: allow themes to mess with the navbar contents without a custom template. It's done as a callback using a transient plugin hook. For instance to get rid of the notifications link: insert_hook('nav','strip_notify'); function strip_notify($a,&$b) { unset($b['nav']['notifications']); } --- include/nav.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'include/nav.php') diff --git a/include/nav.php b/include/nav.php index 51c1cc583..56644f6fd 100644 --- a/include/nav.php +++ b/include/nav.php @@ -201,16 +201,19 @@ EOT; if($banner === false) $banner = 'red'; + $x = array('nav' => $nav, 'usermenu' => $userinfo ); + call_hooks('nav', $x); + $tpl = get_markup_template('nav.tpl'); $a->page['nav'] .= replace_macros($tpl, array( '$baseurl' => $a->get_baseurl(), '$langselector' => ((get_config('system','select_language')) ? lang_selector() : ''), '$sitelocation' => $sitelocation, - '$nav' => $nav, + '$nav' => $x['nav'], '$banner' => $banner, '$emptynotifications' => t('Nothing new here'), - '$userinfo' => $userinfo, + '$userinfo' => $x['usermenu'], '$localuser' => local_user(), '$sel' => $a->nav_sel, '$apps' => $a->get_apps(), -- cgit v1.2.3 From 1aa79d9ee69bbb7afb2c9b87579aad252ef66730 Mon Sep 17 00:00:00 2001 From: friendica Date: Fri, 6 Dec 2013 00:02:39 -0800 Subject: some code cleanup - gad I forgot what a mess the "other" notifications tabs (everything but system) were in. Maybe I'll just remove them so we can start over. --- 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 56644f6fd..f0dd20c6b 100644 --- a/include/nav.php +++ b/include/nav.php @@ -156,7 +156,7 @@ EOT; $nav['intros'] = array('connections/pending', t('Intros'), "", t('New Connections')); - $nav['intros']['all']=array('intro', t('See all channel introductions'), "", ""); + $nav['intros']['all']=array('notifications/intros', t('See all channel introductions'), "", ""); $nav['notifications'] = array('notifications/system', t('Notices'), "", t('Notifications')); -- cgit v1.2.3 From 5382f607d9d67951fe50ed88e87875086276b4d3 Mon Sep 17 00:00:00 2001 From: friendica Date: Fri, 6 Dec 2013 00:11:15 -0800 Subject: yeah - that's what I'm going to do. we'll just keep system notifications. If somebody wants web pages for the others we'll start fresh. It's easier than starting with curfty friendica code that doesn't work anymore and will never work without starting over. --- include/nav.php | 3 --- 1 file changed, 3 deletions(-) (limited to 'include/nav.php') diff --git a/include/nav.php b/include/nav.php index f0dd20c6b..f89de2de0 100644 --- a/include/nav.php +++ b/include/nav.php @@ -147,16 +147,13 @@ EOT; if(local_user()) { $nav['network'] = array('network', t('Matrix'), "", t('Your matrix')); - $nav['network']['all']=array('notifications/network', t('See all matrix notifications'), "", ""); $nav['network']['mark'] = array('', t('Mark all matrix notifications seen'), '',''); $nav['home'] = array('channel/' . $channel['channel_address'], t('Channel Home'), "", t('Channel home')); - $nav['home']['all']=array('notifications/channel', t('See all channel notifications'), "", ""); $nav['home']['mark'] = array('', t('Mark all channel notifications seen'), '',''); $nav['intros'] = array('connections/pending', t('Intros'), "", t('New Connections')); - $nav['intros']['all']=array('notifications/intros', t('See all channel introductions'), "", ""); $nav['notifications'] = array('notifications/system', t('Notices'), "", t('Notifications')); -- cgit v1.2.3 From 950bd72e020daf887ac487c95d6f4f2e42b1dee9 Mon Sep 17 00:00:00 2001 From: friendica Date: Sat, 14 Dec 2013 21:37:37 -0800 Subject: use sitename for the banner if nothing else has been set --- 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 f89de2de0..7e99c782e 100644 --- a/include/nav.php +++ b/include/nav.php @@ -196,7 +196,7 @@ EOT; $banner = get_config('system','banner'); if($banner === false) - $banner = 'red'; + $banner = get_config('system','sitename'); $x = array('nav' => $nav, 'usermenu' => $userinfo ); call_hooks('nav', $x); -- cgit v1.2.3 From d32bbaf599c77aa415ee403a896b77f091f0e9fc Mon Sep 17 00:00:00 2001 From: friendica Date: Sat, 21 Dec 2013 23:47:44 -0800 Subject: split private messages into two modules - "message" is just for message lists, "mail" is for reading and writing conversations. This is so we can Comanchify it cleanly. --- 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 7e99c782e..008899c47 100644 --- a/include/nav.php +++ b/include/nav.php @@ -165,7 +165,7 @@ EOT; $nav['messages']['mark'] = array('', t('Mark all private messages seen'), '',''); $nav['messages']['inbox'] = array('message', t('Inbox'), "", t('Inbox')); $nav['messages']['outbox']= array('message/sent', t('Outbox'), "", t('Outbox')); - $nav['messages']['new'] = array('message/new', t('New Message'), "", t('New Message')); + $nav['messages']['new'] = array('mail/new', t('New Message'), "", t('New Message')); $nav['all_events'] = array('events', t('Events'), "", t('Event Calendar')); -- cgit v1.2.3