This website can use cookies to improve the user experience

This website can use cookies to improve the user experience and to provide certain services and functions to users. Cookies contain small amounts of information (such as login information and user preferences) and will be stored on your device.

Enable All Cookies Privacy Policy

News only on index.php and not on other pages


avatar
suchamatt 0
From: -
News only on index.php and not on other pages

Hey Phillip,

How do I get the 5 news headlines and 5 forum posts to stay to the main page only and not show up as a header block in all my other pages - I find it rather bulky on any page besides the front page and it requires the user to have to scroll down every page.

Thanks

Notice

This topic is archived. New comments cannot be posted and votes cannot be cast.

Responses to this topic


1 Re: News only on index.php and not on other pages
avatar
0
From: -
News only on index.php and not on other pages

Nevermind.. figured it out..
1 Re: News only on index.php and not on other pages
avatar
0
From: -
News only on index.php and not on other pages

Along the same lines, is there a way to print just the login_header_XXXX template at the top of every page, and the login template(s) plus the headlines block on the main page?

I'm sure it's the same code, just at a lower spot in the script. Smiling Face

[Edited by Rushian on 2005-05-24 08:36:08]
1 Re: News only on index.php and not on other pages
avatar
OP 0
From: -
News only on index.php and not on other pages

Worked like a charm!

You're the man Phillip, many thanks!

genius!
1 Re: News only on index.php and not on other pages
avatar
Administrator
1340
From: Vienna, Austria
News only on index.php and not on other pages

Open core.php in an editor and find:
        $cache = GetCache("news", "header_block");


Replace this line with:
if (preg_match("/index.php/i",$_SERVER[PHP_SELF]))

{
$cache = GetCache("news", "header_block");


Find:
            WriteCache("news", "header_block", $thisblock, MkTime()+3600);



}


and replace with:
            WriteCache("news", "header_block", $thisblock, MkTime()+3600);



}
}

Notice

This topic is archived. New comments cannot be posted and votes cannot be cast.