Welcome to Geeklog, Anonymous Saturday, November 30 2024 @ 05:34 am EST

Geeklog Forums

Blocks not on homepage.


Status: offline

jlawrence

Forum User
Chatty
Registered: 12/30/04
Posts: 49
Location:Plymouth, Devon, UK
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.

www.plymouthcricketclub.com - providing cricket for all ages in the Plymouth area.
 Quote

Status: offline

Turner

Forum User
Chatty
Registered: 04/11/05
Posts: 42
I don't think this is easily done (without hacking). From what I can see, it is ALL or ONE.
 Quote

Status: offline

jlawrence

Forum User
Chatty
Registered: 12/30/04
Posts: 49
Location:Plymouth, Devon, UK
Looks like it's hacking time then Smile
www.plymouthcricketclub.com - providing cricket for all ages in the Plymouth area.
 Quote

Status: offline

jlawrence

Forum User
Chatty
Registered: 12/30/04
Posts: 49
Location:Plymouth, Devon, UK
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.
www.plymouthcricketclub.com - providing cricket for all ages in the Plymouth area.
 Quote

All times are EST. The time is now 05:34 am.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content