custom header include only visible on front page custom header include only visible on front page
 

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]

Main Menu

custom header include only visible on front page

Started by altenae, November 07, 2011, 09:39:28 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

altenae

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

altenae

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

altenae

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

ΑndrĂ©

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']);
    }

altenae

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

altenae

I also did the change in the theme_inc.php and this works.....Thanks...