aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2017-10-09 17:49:55 +0200
committerMario Vavti <mario@mariovavti.com>2017-10-09 17:49:55 +0200
commit5698462588066b942d7f8784d06942385db8daa4 (patch)
tree15e65d68fc7a0c8bbe06143e4d8da23a6b8e8585 /include
parentf99c007187b83755d7b1c80c63fde7c1162a99c4 (diff)
parent23812e5b48b7a4d4f0c275c0fbb3d244a582397c (diff)
downloadvolse-hubzilla-5698462588066b942d7f8784d06942385db8daa4.tar.gz
volse-hubzilla-5698462588066b942d7f8784d06942385db8daa4.tar.bz2
volse-hubzilla-5698462588066b942d7f8784d06942385db8daa4.zip
Merge remote-tracking branch 'mike/master' into dev
Diffstat (limited to 'include')
-rw-r--r--include/nav.php27
1 files changed, 22 insertions, 5 deletions
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')
]
);
}