diff options
author | redmatrix <git@macgirvin.com> | 2016-04-21 17:09:13 -0700 |
---|---|---|
committer | redmatrix <git@macgirvin.com> | 2016-04-21 17:09:13 -0700 |
commit | 540800da959bc03df21d02c31142a1ef389fb855 (patch) | |
tree | d73e1361dfe9b9c36eb0857d786deafa7621d1e2 /include/nav.php | |
parent | 1ff189ee907e6465dfb35118f789f10e714d38a1 (diff) | |
parent | cb8c83a42bc827d7b2fc589d3289ec62c4167398 (diff) | |
download | volse-hubzilla-540800da959bc03df21d02c31142a1ef389fb855.tar.gz volse-hubzilla-540800da959bc03df21d02c31142a1ef389fb855.tar.bz2 volse-hubzilla-540800da959bc03df21d02c31142a1ef389fb855.zip |
Merge branch 'dev' of https://github.com/redmatrix/hubzilla into dev_merge
Diffstat (limited to 'include/nav.php')
-rw-r--r-- | include/nav.php | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/include/nav.php b/include/nav.php index 027ce4a6c..c59aaae37 100644 --- a/include/nav.php +++ b/include/nav.php @@ -150,9 +150,15 @@ EOT; $help_url = z_root() . '/help?f=&cmd=' . App::$cmd; if(! get_config('system','hide_help')) { - require_once('include/help.php'); - $context_help = load_context_help(); - $nav['help'] = array($help_url, t('Help'), "", t('Help and documentation'),'help_nav_btn',$context_help); + $context_help = ''; + $enable_context_help = ((intval(get_config('system','enable_context_help')) === 1 || get_config('system','enable_context_help') === false) ? true : false); + if($enable_context_help === true) { + require_once('include/help.php'); + $context_help = load_context_help(); + //direct directly to /help if $context_help is empty - this can be removed once we have context help for all modules + $enable_context_help = (($context_help) ? true : false); + } + $nav['help'] = array($help_url, t('Help'), "", t('Help and documentation'), 'help_nav_btn', $context_help, $enable_context_help); } if(! UNO) @@ -234,6 +240,12 @@ $powered_by = ''; // $powered_by = '<strong>red<img class="smiley" src="' . z_root() . '/images/rm-16.png" alt="r#" />matrix</strong>'; + $tpl = get_markup_template('nav_header.tpl'); + + App::$page['htmlhead'] .= replace_macros($tpl, array( + '$enable_context_help' => $enable_context_help + )); + $tpl = get_markup_template('nav.tpl'); App::$page['nav'] .= replace_macros($tpl, array( @@ -248,7 +260,7 @@ $powered_by = ''; '$powered_by' => $powered_by, '$help' => t('@name, #tag, ?doc, content'), '$pleasewait' => t('Please wait...') - )); + )); call_hooks('page_header', App::$page['nav']); } |