Hello,
I have a question regarding customizing Coppermine into my website. I am trying to add my website's own header by doing a php include.
I read the FAQ's and it had some advice on how to do this. Unfortunately I am getting some errors...
Can anyone advice me on what I may be doing wrong?
This is what I did change (as in the FAQ):
function pageheader($section, $meta = '')
{
global $CONFIG, $THEME_DIR;
global $template_header, $lang_charset, $lang_text_dir;
if(empty($custom_header)){
include('../../../../includes/header.php');
static $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);
}
But I am getting the following error:
Parse error: parse error, expecting `','' or `';'' in /home/geoff/gallery/themes/hardwired/theme.php on line 741
Fatal error: Call to undefined function: pageheader() in /home/geoff/gallery/index.php on line 432
Line 741 points at this statement:
static $custom_header = ob_get_contents();
but I don't know what to change?
When I removed the following code I was able to get the gallery show up but for some reason it couldn't find my header. What does this code refer to:
static $custom_header = ob_get_contents();
ob_clean();
Ideally I would like to be able to change the template so that I would have my own php included header/footer and left column/right column. I am trying to build a CMS for a volunteer project.
I would very much appreciate if someone could take the time to explain how I can acchieve this in the template design.
I also tried to change the template configuration value of html extension to php in the includes/init.inc.php file and then change the template.html file to template.php with the normal php include commands. Unfortunately it didn't work :cry:
I am not really a programmer of heart. I mostly do the trial and error thing...and now I have come to a complete stop.
Any help would be appreciated!