Posted on: 05/12/05 11:20am
By: jlawrence
Hi all,
I have a couple of blocks that I want to display, but I don't want them on the home page.
Is there a way to tell geeklog to display the blocks in all topics apart from the homepage.
Blocks not on homepage.
Posted on: 05/12/05 12:42pm
By: Turner
I don't think this is easily done (without hacking). From what I can see, it is ALL or ONE.
Blocks not on homepage.
Posted on: 05/12/05 01:26pm
By: jlawrence
Looks like it's hacking time then
Blocks not on homepage.
Posted on: 05/12/05 05:20pm
By: jlawrence
OK, for anyone who cares this is how I did it.
The blocks in question are phpblocks, so in the function phpblock_functionname in lib-custom.php I added the following:
if ( ($_SERVER['SCRIPT_URL']!="index.php") && ($_SERVER['SCRIPT_URL']!="/")){
..... rest of ......
.... function .....
}
return $retval;
So if the url is / or /index.php $retval is empty and so the block doesn't display.
This works a treat.