hi
so sorry to ask again but I am fairly sure that this isn't in the manuals....so I have a php file that I have included by using this mod to the theme.php file:
function pageheader($section, $meta = '')
{
global $CONFIG, $THEME_DIR;
global $template_header, $lang_charset, $lang_text_dir;
if(empty($custom_header)){
include('MYPHPFILE.php');
static $custom_header;
$custom_header = ob_get_contents();
ob_clean();
}
header('P3P: CP="CAO DSP COR CURa ADMa DEVa OUR IND PHY ONL UNI COM NAV INT DEM PRE"');
user_save_profile();
$template_vars = array(
'{LANG_DIR}' => $lang_text_dir,
'{TITLE}' => $CONFIG['gallery_name'].' - '.$section,
'{CHARSET}' => $CONFIG['charset'] == 'language file' ? $lang_charset : $CONFIG['charset'],
'{META}' => $meta,
'{GAL_NAME}' => $CONFIG['gallery_name'],
'{GAL_DESCRIPTION}' => $CONFIG['gallery_description'],
'{MAIN_MENU}' => theme_main_menu(),
'{ADMIN_MENU}' => theme_admin_mode_menu(),
'{CUSTOM_HEADER}' => $custom_header,
);
echo template_eval($template_header, $template_vars);
}
The Php file consists of an 'if' and 'else' statement...when run on its own the php file will run fine except when included in the theme.php file it only seems to execute the 'if' and not the 'else' statement because even if the 'if' is a negative it still behaves as if it is a possitive and the 'else' doesn't get a chance to run.
Any help on the would be great and sorry if it is a question that is repeated somewhere in the docs/forums.
Cheers
Nick