diff --git a/Zotlabs/Lib/Apps.php b/Zotlabs/Lib/Apps.php
index c4f4038dc..f13fbe362 100644
--- a/Zotlabs/Lib/Apps.php
+++ b/Zotlabs/Lib/Apps.php
@@ -383,6 +383,13 @@ class Apps {
$install_action = (($installed) ? t('Update') : t('Install'));
$icon = ((strpos($papp['photo'],'icon:') === 0) ? substr($papp['photo'],5) : '');
+ if($mode === 'navbar') {
+ return replace_macros(get_markup_template('app_nav.tpl'),array(
+ '$app' => $papp,
+ '$icon' => $icon,
+ ));
+ }
+
return replace_macros(get_markup_template('app.tpl'),array(
'$app' => $papp,
'$icon' => $icon,
diff --git a/Zotlabs/Lib/ThreadStream.php b/Zotlabs/Lib/ThreadStream.php
index d7a898704..436723f8c 100644
--- a/Zotlabs/Lib/ThreadStream.php
+++ b/Zotlabs/Lib/ThreadStream.php
@@ -68,7 +68,7 @@ class ThreadStream {
// pull some trickery which allows us to re-invoke this function afterward
// it's an ugly hack so @FIXME
$this->writable = perm_is_allowed($this->profile_owner,$ob_hash,'post_comments');
- $this->uploadable = false;
+ $this->uploadable = perm_is_allowed($this->profile_owner,$ob_hash,'write_storage');
break;
case 'page':
$this->profile_owner = \App::$profile['uid'];
diff --git a/Zotlabs/Render/Comanche.php b/Zotlabs/Render/Comanche.php
index d126cb3da..ca664cba6 100644
--- a/Zotlabs/Render/Comanche.php
+++ b/Zotlabs/Render/Comanche.php
@@ -121,6 +121,11 @@ class Comanche {
if($cnt)
\App::$layout['theme'] = trim($matches[1]);
+ $cnt = preg_match("/\[navbar\](.*?)\[\/navbar\]/ism", $s, $matches);
+ if($cnt)
+ \App::$layout['navbar'] = trim($matches[1]);
+
+
$cnt = preg_match_all("/\[webpage\](.*?)\[\/webpage\]/ism", $s, $matches, PREG_SET_ORDER);
if($cnt) {
// only the last webpage definition is used if there is more than one
diff --git a/boot.php b/boot.php
index f955ba511..df57009e5 100755
--- a/boot.php
+++ b/boot.php
@@ -2090,17 +2090,21 @@ function construct_page() {
$installing = false;
+ $navbar = get_config('system','navbar','nav');
+ if(App::$profile_uid) {
+ $navbar = get_pconfig(App::$profile_uid,'system','navbar',$navbar);
+ }
+
+ if($comanche && App::$layout['navbar']) {
+ $navbar = App::$layout['navbar'];
+ }
+
if (App::$module == 'setup') {
$installing = true;
} else {
- nav($a);
+ nav($navbar);
}
- if ($comanche) {
- if (App::$layout['nav']) {
- App::$page['nav'] = get_custom_nav(App::$layout['nav']);
- }
- }
$current_theme = Zotlabs\Render\Theme::current();
diff --git a/doc/member/member_guide.bb b/doc/member/member_guide.bb
index 0a2d11a88..0794f24d3 100644
--- a/doc/member/member_guide.bb
+++ b/doc/member/member_guide.bb
@@ -634,6 +634,15 @@ This will select the theme named "suckerberg" and select the "pas
The condensed notation isn't part of Comanche itself but is recognised by $Projectname platform as a theme specifier.
+[h4]Navbar[/h4]
+
+[code]
+ [navbar]tucson[/navbar]
+[/code]
+
+Use the 'tucson' navbar template and CSS rules. By default the 'nav' navbar template will be used.
+
+
[h4]Regions[/h4]
Each region has a name, as noted above. You will specify the region of interest using a 'region' tag, which includes the name. Any content you wish placed in this region should be placed between the opening region tag and the closing tag.
diff --git a/include/nav.php b/include/nav.php
index 28ca54d07..8736133de 100644
--- a/include/nav.php
+++ b/include/nav.php
@@ -6,7 +6,7 @@ require_once('include/security.php');
require_once('include/menu.php');
-function nav() {
+function nav($template = 'nav') {
/**
*
@@ -261,13 +261,30 @@ EOT;
if(\App::$nav_sel['name'] == $app['name'])
$app['active'] = true;
- if($is_owner)
+ if($is_owner) {
$nav_apps[] = Zlib\Apps::app_render($app,'nav');
- elseif(! $is_owner && strpos($app['requires'], 'local_channel') === false)
+ if(strpos($app['categories'],'navbar_' . $template)) {
+ $navbar_apps[] = Zlib\Apps::app_render($app,'navbar');
+ }
+ }
+ elseif(! $is_owner && strpos($app['requires'], 'local_channel') === false) {
$nav_apps[] = Zlib\Apps::app_render($app,'nav');
+ if(strpos($app['categories'],'navbar_' . $template)) {
+ $navbar_apps[] = Zlib\Apps::app_render($app,'navbar');
+ }
+ }
}
- $tpl = get_markup_template('nav.tpl');
+ $c = theme_include('navbar_' . $template . '.css');
+ $tpl = get_markup_template('navbar_' . $template . '.tpl');
+
+ if($c && $tpl) {
+ head_add_css('navbar_' . $template . '.css');
+ }
+
+ if(! $tpl) {
+ $tpl = get_markup_template('nav.tpl');
+ }
App::$page['nav'] .= replace_macros($tpl, array(
'$baseurl' => z_root(),
@@ -285,6 +302,7 @@ EOT;
'$help' => t('@name, #tag, ?doc, content'),
'$pleasewait' => t('Please wait...'),
'$nav_apps' => $nav_apps,
+ '$navbar_apps' => $navbar_apps,
'$channel_menu' => get_config('system','channel_menu'),
'$channel_thumb' => ((App::$profile) ? App::$profile['thumb'] : ''),
'$channel_apps' => $channel_apps,
@@ -497,7 +515,6 @@ function channel_apps($is_owner = false, $nickname = null) {
'$tabs' => $arr['tabs'],
'$name' => App::$profile['channel_name'],
'$thumb' => App::$profile['thumb'],
- '$channel_menu' => get_config('system','channel_menu')
]
);
}
diff --git a/view/theme/redbasic/css/style.css b/view/theme/redbasic/css/style.css
index a912fb825..2e8d71954 100644
--- a/view/theme/redbasic/css/style.css
+++ b/view/theme/redbasic/css/style.css
@@ -1458,6 +1458,10 @@ blockquote {
background-color: $nav_bg !important;
}
+.navbar {
+ z-index:1030;
+}
+
.navbar-dark .navbar-nav .nav-link,
.usermenu i {
color: $nav_icon_colour;
diff --git a/view/tpl/app_nav.tpl b/view/tpl/app_nav.tpl
new file mode 100644
index 000000000..1ee5adb70
--- /dev/null
+++ b/view/tpl/app_nav.tpl
@@ -0,0 +1 @@
+{{if $icon}}{{else}}{{/if}}
diff --git a/view/tpl/nav.tpl b/view/tpl/nav.tpl
index 15896c159..d2bd20f8f 100755
--- a/view/tpl/nav.tpl
+++ b/view/tpl/nav.tpl
@@ -253,6 +253,7 @@
{{foreach $channel_apps as $channel_app}}
{{$channel_app}}
{{/foreach}}
+