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

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

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