coppermine-gallery.com/forum

Support => cpg1.5.x Support => cpg1.5 themes (visuals) => Topic started by: altenae on November 07, 2011, 09:39:28 AM

Title: custom header include only visible on front page
Post by: altenae 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
Title: Re: custom header include only visible on front page
Post by: altenae 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
Title: Re: custom header include only visible on front page
Post by: altenae 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
Title: Re: custom header include only visible on front page
Post by: Αndré on November 14, 2011, 04:45:30 PM
Replace
    $custom_header = cpg_get_custom_include($CONFIG['custom_header_path']);
with
    global $CPG_PHP_SELF, $cat;
    if ($CPG_PHP_SELF == 'index.php' && $cat == 0) {
        $custom_header = cpg_get_custom_include($CONFIG['custom_header_path']);
    }
Title: Re: custom header include only visible on front page
Post by: altenae 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
Title: Re: custom header include only visible on front page
Post by: altenae on November 14, 2011, 07:23:55 PM
I also did the change in the theme_inc.php and this works.....Thanks...