diff options
author | Zach Prezkuta <fermion@gmx.com> | 2013-01-06 14:42:51 -0700 |
---|---|---|
committer | Zach Prezkuta <fermion@gmx.com> | 2013-01-06 15:57:11 -0700 |
commit | a0d19ffb7241a1c7a4b85e6d0fd58fbb2f718468 (patch) | |
tree | 280d792355cb2e60cf62e8451b6d8afbbfcc7c0d /index.php | |
parent | 61b8ea9e1af74e2056e18b02c170a899de9abd1b (diff) | |
download | volse-hubzilla-a0d19ffb7241a1c7a4b85e6d0fd58fbb2f718468.tar.gz volse-hubzilla-a0d19ffb7241a1c7a4b85e6d0fd58fbb2f718468.tar.bz2 volse-hubzilla-a0d19ffb7241a1c7a4b85e6d0fd58fbb2f718468.zip |
implement Smarty3
Diffstat (limited to 'index.php')
-rw-r--r-- | index.php | 22 |
1 files changed, 12 insertions, 10 deletions
@@ -96,13 +96,6 @@ if((x($_GET,'zid')) && (! $install)) { if((x($_SESSION,'authenticated')) || (x($_POST,'auth-params')) || ($a->module === 'login')) require("auth.php"); -/* - * Create the page head after setting the language - * and getting any auth credentials - */ - -$a->init_pagehead(); - if(! x($_SESSION,'sysmsg')) $_SESSION['sysmsg'] = array(); @@ -280,18 +273,28 @@ if($a->module_loaded) { if(! $a->error) { + // If a theme has defined an _aside() function, run that first + // + // If the theme function doesn't exist, see if this theme extends another, + // and see if that other theme has an _aside() function--if it does, run it + // + // If $aside_default is not False after the theme _aside() function, run the + // module's _aside() function too + // + // This gives themes more control over how the left sidebar looks + $aside_default = true; call_hooks($a->module . '_mod_aside',$placeholder); if(function_exists(str_replace('-','_',current_theme()) . '_' . $a->module . '_aside')) { $func = str_replace('-','_',current_theme()) . '_' . $a->module . '_aside'; $aside_default = $func($a); } - elseif(x($a->theme_info,"extends") && $aside_default + elseif($aside_default && x($a->theme_info,"extends") && (function_exists(str_replace('-','_',$a->theme_info["extends"]) . '_' . $a->module . '_aside'))) { $func = str_replace('-','_',$a->theme_info["extends"]) . '_' . $a->module . '_aside'; $aside_default = $func($a); } - elseif(function_exists($a->module . '_aside') && $aside_default) { + if($aside_default && function_exists($a->module . '_aside')) { $func = $a->module . '_aside'; $func($a); } @@ -329,7 +332,6 @@ if(stristr( implode("",$_SESSION['sysmsg']), t('Permission denied'))) { call_hooks('page_end', $a->page['content']); - construct_page($a); session_write_close(); |