aboutsummaryrefslogtreecommitdiffstats
path: root/include/nav.php
diff options
context:
space:
mode:
Diffstat (limited to 'include/nav.php')
-rw-r--r--include/nav.php28
1 files changed, 23 insertions, 5 deletions
diff --git a/include/nav.php b/include/nav.php
index 2dcf68bc8..8566cc58c 100644
--- a/include/nav.php
+++ b/include/nav.php
@@ -73,6 +73,11 @@ EOT;
// nav links: array of array('href', 'text', 'extra css classes', 'title')
$nav = [];
+ $disable_discover_tab = get_config('system','disable_discover_tab') || get_config('system','disable_discover_tab') === false;
+
+ if(! $disable_discover_tab)
+ $nav['pubs'] = true;
+
/**
* Display login or logout
*/
@@ -171,13 +176,15 @@ EOT;
}
-
- $homelink = get_my_url();
- if(! $homelink) {
+ $my_url = get_my_url();
+ if(! $my_url) {
$observer = App::get_observer();
- $homelink = (($observer) ? $observer['xchan_url'] : '');
+ $my_url = (($observer) ? $observer['xchan_url'] : '');
}
+ $homelink_arr = parse_url($my_url);
+ $homelink = $homelink_arr['scheme'] . '://' . $homelink_arr['host'];
+
if(! $is_owner) {
$nav['rusermenu'] = array(
$homelink,
@@ -308,7 +315,7 @@ EOT;
'$sitelocation' => $sitelocation,
'$nav' => $x['nav'],
'$banner' => $banner,
- '$emptynotifications' => t('Loading...'),
+ '$emptynotifications' => t('Loading'),
'$userinfo' => $x['usermenu'],
'$localuser' => local_channel(),
'$is_owner' => $is_owner,
@@ -491,6 +498,17 @@ function channel_apps($is_owner = false, $nickname = null) {
];
}
+ if($p['view_pages'] && feature_enabled($uid,'articles')) {
+ $tabs[] = [
+ 'label' => t('Articles'),
+ 'url' => z_root() . '/articles/' . $nickname ,
+ 'sel' => ((argv(0) == 'articles') ? 'active' : ''),
+ 'title' => t('View Articles'),
+ 'id' => 'articles-tab',
+ 'icon' => 'file-text-o'
+ ];
+ }
+
if($has_webpages && feature_enabled($uid,'webpages')) {
$tabs[] = [