From 549866c0900c1ff550e001323c59a74352920770 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Tue, 7 Nov 2017 10:43:13 +0100 Subject: add location info to the navbar --- include/nav.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'include') diff --git a/include/nav.php b/include/nav.php index af0ebbae2..42c42e881 100644 --- a/include/nav.php +++ b/include/nav.php @@ -27,6 +27,8 @@ function nav($template = 'default') { EOT; + $is_owner = (((local_channel()) && ((App::$profile_uid == local_channel()) || (App::$profile_uid == 0))) ? true : false); + if(local_channel()) { $channel = App::get_channel(); $observer = App::get_observer(); @@ -39,17 +41,17 @@ EOT; intval(get_account_id()) ); } + $sitelocation = (($is_owner) ? '' : App::$profile['reddress']); } - elseif(remote_channel()) + elseif(remote_channel()) { $observer = App::get_observer(); + $sitelocation = ((App::$profile['reddress']) ? App::$profile['reddress'] : '@' . App::get_hostname()); + } require_once('include/conversation.php'); - $is_owner = (((local_channel()) && ((App::$profile_uid == local_channel()) || (App::$profile_uid == 0))) ? true : false); + $channel_apps[] = channel_apps($is_owner, App::$profile['channel_address']); - $myident = (($channel) ? $channel['xchan_addr'] : ''); - - $sitelocation = (($myident) ? $myident : App::get_hostname()); /** * -- cgit v1.2.3 From 47fbdda40951be5109c739f63331e2bb95ebd64a Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Tue, 7 Nov 2017 11:22:11 +0100 Subject: rename channel app events to calendar and add nav_set_selected() to /cal --- include/nav.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/nav.php b/include/nav.php index 42c42e881..9df50c9fe 100644 --- a/include/nav.php +++ b/include/nav.php @@ -440,10 +440,10 @@ function channel_apps($is_owner = false, $nickname = null) { if($p['view_stream'] && $cal_link) { $tabs[] = [ - 'label' => t('Events'), + 'label' => t('Calendar'), 'url' => z_root() . $cal_link, - 'sel' => ((argv(0) == 'cal' || argv(0) == 'events') ? 'active' : ''), - 'title' => t('Events'), + 'sel' => ((argv(0) == 'cal') ? 'active' : ''), + 'title' => t('Calendar'), 'id' => 'event-tab', 'icon' => 'calendar' ]; -- cgit v1.2.3