Welcome to Geeklog Monday, October 19 2020 @ 07:56 pm EDT

Geeklog Forums

Blocks not on homepage.


Status: offline

jlawrence

Forum User
Chatty
Registered: 30/12/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: 11/04/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: 30/12/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: 30/12/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 EDT. The time is now 07:56 pm.

  • 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