Hi
I have tried searching this site, and used what topics I could, yet I must be missing something, as I cannot get the content from anycontent.php to show on any page within coppermine..
The content I have is
<? include "http://www.anotherdomain.co.uk/pbanner/banner.php"; ?>
Any help is welcome..
Thanks Mark
You add it into 'contents of the main page' in config page, and it should then appear on your main page. Post a link to your site if it doesn't work.
Hi
Thanks, it brought up a parse error. I can give you the link, but it will have to be via pm, as it is an adult type site..
What I am trying to do is place a banner just above the pagefooter, so far without much success..It needs to appear on every page..
Thanks Mark
If you need it on every page then you need to treat it as a custom footer, not as an anycontent block. Refer to the docs for how to do this.
HI
Thanks, dead easy when you can find the info, or at least know where to look.
Thanks Mark
Hi
Well, I spoke too soon, followed what the docs said, and got the following error, although I cannot see anything wrong with script..
Parse error: parse error, expecting `','' or `';'' in /home/virtual/site5/fst/var/www/html/mem/memm/themes/classic/theme.php on line 812
Line 812
static $custom_header = ob_get_contents();
Fatal error: Call to undefined function: theme_display_album_list_cat() in /home/virtual/site5/fst/var/www/html/mem/memm/index.php on line 647
Line 647
theme_display_album_list_cat($alb_list, $nbAlb, $cat, $PAGE, $totalPages);
Can you post your full pageheader() function here please ? use the [ code ] and [ /code ] tags to keep it readable.
Hi
Sorry for delay was watching news..
function pageheader($section, $meta = '')
{
global $CONFIG, $THEME_DIR;
global $template_header, $lang_charset, $lang_text_dir;
if(empty($custom_header)){
include('/banner/pbanner.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);
}
// Function for writing a pagefooter
Hi
Any ideas??
Thanks Mark
Change the top part to the following:
if(empty($custom_header)){
include('/banner/pbanner.php');
static $custom_header;
$custom_header = ob_get_contents();
ob_clean();
}
Hi
Nope this didn't work
what is now displays at the bottom of the page is
Powered by Coppermine Photo Gallery
{CUSTOM_HEADER}
can't for the life of me figure out what is wrong
function pageheader($section, $meta = '')
{
global $CONFIG, $THEME_DIR;
global $template_header, $lang_charset, $lang_text_dir;
if(empty($custom_header)){
include('http://www.mydomain.co.uk/pbanner/banner.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);
}
Ahh, ok I see what is wrong, this will only work if used at the top of a page, I need it to be at the bottom of the page..
Thanks Mark
Then you need to put it in the page footer function.
Tried that and it crashed the software
details?
I placed the code from the above header (as detailed a couple of replies above) simply would not work and brought up a php error, so I suspect it is more like something I have done, such as placing the code in the wrong place. An example of how the code should be placed would be welcome
Thanks Mark
http://forum.coppermine-gallery.net/index.php?topic=9863.msg44419#msg44419
Joachim