Welcome to Geeklog, Anonymous Thursday, October 06 2022 @ 04:02 pm EDT

Geeklog Forums

Custom blockheader code


I have the following code placed in blockheader.thtml

$test = '{block_title}';

if ( $test == "Menu" ) {
print "

Basically, this replaced the block title with an image. It works fine on the left blocks.....but doesnt work on the right blocks? Anybody have any ideas?

Status: Banned


Forum User
Full Member
Registered: 03/22/04
Posts: 1512
my guess:
the left blocks are loaded from your header, which will have its PHP evaluated, while the right blocks are loaded from the footer, which does not have inserted PHP evaluated. something like that I think

Status: offline


Site Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Machinari's answer was spot-on. Officially, PHP is only supported in header.thtml. It just happens to work in all templates that are included from header.thtml - and that includes the left blocks. You shouldn't count on that, though.

You didn't say what you were trying to do, but maybe this will give you some ideas.

bye, Dirk

Status: offline


Forum User
Full Member
Registered: 12/29/04
Posts: 555
Location:Champaign, Illinois
I was able to do it with javascript here.

but I was also thinking of something like this although I have not tried it:
Text Formatted Code
<img src="yoursite.com/{block_title}.gif">

and have a gif or jpg for every block title.
FlashYourWeb and Your Gallery with the E2 XML Media Player for Gallery2 - http://www.flashyourweb.com

All times are EDT. The time is now 04:02 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