diff options
author | habeascodice <habeascodice@federated.social> | 2014-10-29 03:39:07 -0700 |
---|---|---|
committer | habeascodice <habeascodice@federated.social> | 2014-10-29 03:39:07 -0700 |
commit | bc02b933727da7a000d43d2d7d495f066616dc81 (patch) | |
tree | e590b70757edb94655872f5b992f143cead61eb3 /index.php | |
parent | fc12123329133cea39f27615a7c24c57e5b4a35d (diff) | |
parent | 7d9f785758ee6e4c19838e532f9930e227e95fc6 (diff) | |
download | volse-hubzilla-bc02b933727da7a000d43d2d7d495f066616dc81.tar.gz volse-hubzilla-bc02b933727da7a000d43d2d7d495f066616dc81.tar.bz2 volse-hubzilla-bc02b933727da7a000d43d2d7d495f066616dc81.zip |
Merge remote branch 'upstream/master'
Diffstat (limited to 'index.php')
-rwxr-xr-x | index.php | 40 |
1 files changed, 32 insertions, 8 deletions
@@ -242,14 +242,6 @@ if(strlen($a->module)) { } } -/** - * load current theme info - */ -$theme_info_file = "view/theme/".current_theme()."/php/theme.php"; -if (file_exists($theme_info_file)){ - require_once($theme_info_file); -} - /* initialise content region */ @@ -281,12 +273,44 @@ if($a->module_loaded) { $a->page['page_title'] = $a->module; $placeholder = ''; + /** + * No theme has been specified when calling the module_init functions + * For this reason, please restrict the use of templates to those which + * do not provide any presentation details - as themes will not be able + * to over-ride them. + */ + if(function_exists($a->module . '_init')) { call_hooks($a->module . '_mod_init', $placeholder); $func = $a->module . '_init'; $func($a); } + /** + * Do all theme initialiasion here before calling any additional module functions. + * The module_init function may have changed the theme. + * Additionally any page with a Comanche template may alter the theme. + * So we'll check for those now. + */ + + + /** + * In case a page has overloaded a module, see if we already have a layout defined + * otherwise, if a PDL file exists for this module, use it + * The member may have also created a customised PDL that's stored in the config + */ + + load_pdl($a); + + /** + * load current theme info + */ + + $theme_info_file = "view/theme/".current_theme()."/php/theme.php"; + if (file_exists($theme_info_file)){ + require_once($theme_info_file); + } + if(function_exists(str_replace('-','_',current_theme()) . '_init')) { $func = str_replace('-','_',current_theme()) . '_init'; $func($a); |