Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: custom header include only visible on front page  (Read 3338 times)

0 Members and 1 Guest are viewing this topic.

altenae

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 254
custom header include only visible on front page
« on: November 07, 2011, 09:39:28 am »

Hi,

I want the custom header to be only active/visible in the main screen ($cat ==0)

I thought about something like this in the theme.php:

if ($cat == 0) {
                   $custom_header = cpg_get_custom_include($CONFIG['custom_header_path']);
         } else {      
               $custom_header = ";   
        }

However this is not working because I think $cat has no value in the theme.php

Anyone any thought on how to accomplish this ?

Thanks,

Edward
Logged

altenae

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 254
Re: custom header include only visible on front page
« Reply #1 on: November 07, 2011, 10:40:07 am »

The custom header should also not be visible when displaying an image. (displayimage.php)

Not sure if $cat <> 0 when displaying an image.

Thanks,

Edward
Logged

altenae

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 254
Re: custom header include only visible on front page
« Reply #2 on: November 07, 2011, 01:01:39 pm »

Well I tried some other things...I was not succesful.
When clicking in "Last Uploads" I want the custom header also to dissappear.
But looking at the URL the cat is still 0.


thumbnails.php?album=lastup&cat=0

Edward
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: custom header include only visible on front page
« Reply #3 on: November 14, 2011, 04:45:30 pm »

Replace
Code: [Select]
    $custom_header = cpg_get_custom_include($CONFIG['custom_header_path']);with
Code: [Select]
    global $CPG_PHP_SELF, $cat;
    if ($CPG_PHP_SELF == 'index.php' && $cat == 0) {
        $custom_header = cpg_get_custom_include($CONFIG['custom_header_path']);
    }
Logged

altenae

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 254
Re: custom header include only visible on front page
« Reply #4 on: November 14, 2011, 07:06:05 pm »

I have changed the suggested code in the theme.php of my theme.

The custom header is still present on all pages.
Or do you want this code in the theme_inc.php ?

Edward
Logged

altenae

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 254
Re: custom header include only visible on front page
« Reply #5 on: November 14, 2011, 07:23:55 pm »

I also did the change in the theme_inc.php and this works.....Thanks...
Logged
Pages: [1]   Go Up
 

Page created in 0.022 seconds with 19 queries.