Welcome to Geeklog, Anonymous Thursday, January 02 2025 @ 10:12 pm EST
Geeklog Forums
Custom blockheader code
sgtpepper
Anonymous
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?
$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?
9
7
Quote
Status: Banned
machinari
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
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
10
25
Quote
Status: offline
Dirk
Site Admin
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
You didn't say what you were trying to do, but maybe this will give you some ideas.
bye, Dirk
9
8
Quote
Status: offline
suprsidr
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:
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
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
9
9
Quote
All times are EST. The time is now 10:12 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