Description: Plugin grabs extra header and footer code and stores it in a hook to be called when the header and footer templates are rendered.
Hook: global_start
PHP Code:
require_once('../includes/Smarty/Smarty.class.php');
require_once('../includes/functions.php');
require_once('../includes/vars.inc.php');
$tpl = new Smarty();
$tpl->template_dir = '**REMOVED**';
$tpl->compile_dir = '**REMOVED**';
$tpl->config_dir = '**REMOVED**';
$tpl->cache_dir = '**REMOVED**';
load_language();
ob_start();
show_header(true);
$template_hook['header_extra'] = ob_get_contents();
ob_end_clean();
ob_start();
show_footer(true);
$template_hook['footer_extra'] = ob_get_contents();
ob_end_clean();
This plugin works everywhere (forums, vbgallery, blog) in the site except on the cms (home) page. My guess is that the global_start hook is not executed when accessing the cms pages. What hook should I be using and should any of the code be modified?