Advanced search  

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Pages: [1]   Go Down

Author Topic: re-placing content in anycontent.php  (Read 6158 times)

0 Members and 1 Guest are viewing this topic.

markp17

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 56
re-placing content in anycontent.php
« on: December 31, 2004, 04:13:20 pm »

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
Logged

Nibbler

  • Guest
Re: re-placing content in anycontent.php
« Reply #1 on: December 31, 2004, 04:57:57 pm »

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.
Logged

markp17

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 56
Re: re-placing content in anycontent.php
« Reply #2 on: January 02, 2005, 06:02:46 pm »

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
Logged

Nibbler

  • Guest
Re: re-placing content in anycontent.php
« Reply #3 on: January 02, 2005, 06:12:11 pm »

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.
Logged

markp17

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 56
Re: re-placing content in anycontent.php
« Reply #4 on: January 02, 2005, 06:15:56 pm »

HI

Thanks, dead easy when you can find the info, or at least know where to look.

Thanks Mark
Logged

markp17

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 56
Re: re-placing content in anycontent.php
« Reply #5 on: January 02, 2005, 06:41:38 pm »

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);
Logged

Nibbler

  • Guest
Re: re-placing content in anycontent.php
« Reply #6 on: January 02, 2005, 06:54:50 pm »

Can you post your full pageheader() function here please ? use the [ code ] and [ /code ] tags to keep it readable.
Logged

markp17

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 56
Re: re-placing content in anycontent.php
« Reply #7 on: January 02, 2005, 07:48:03 pm »

Hi

Sorry for delay was watching news..

Code: [Select]
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
Logged

markp17

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 56
Re: re-placing content in anycontent.php
« Reply #8 on: January 16, 2005, 11:26:09 am »

Hi

Any ideas??

Thanks Mark
Logged

Nibbler

  • Guest
Re: re-placing content in anycontent.php
« Reply #9 on: January 16, 2005, 03:24:42 pm »

Change the top part to the following:

Code: [Select]
   if(empty($custom_header)){
   include('/banner/pbanner.php');
   static $custom_header;
   $custom_header = ob_get_contents(); 
   ob_clean();
}
Logged

markp17

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 56
Re: re-placing content in anycontent.php
« Reply #10 on: January 18, 2005, 12:26:06 pm »

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

Code: [Select]
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);
}
Logged

markp17

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 56
Re: re-placing content in anycontent.php
« Reply #11 on: January 18, 2005, 12:28:08 pm »

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
Logged

Casper

  • VIP
  • Coppermine addict
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 5231
Re: re-placing content in anycontent.php
« Reply #12 on: January 18, 2005, 12:43:11 pm »

Then you need to put it in the page footer function.
Logged
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

markp17

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 56
Re: re-placing content in anycontent.php
« Reply #13 on: January 18, 2005, 01:14:42 pm »

Tried that and it crashed the software
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: re-placing content in anycontent.php
« Reply #14 on: January 19, 2005, 07:41:11 am »

details?
Logged

markp17

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 56
Re: re-placing content in anycontent.php
« Reply #15 on: January 21, 2005, 11:57:49 am »

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
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Logged
Pages: [1]   Go Up
 

Page created in 0.021 seconds with 20 queries.