Status: offline

beepy

Forum User
Newbie
Registered: 06/20/03
Posts: 3
The Geeklog docs say that "PHP in themes: You can use PHP in the header of a theme, i.e. in the header.thtml file," which gives me the impression that PHP is only safe in the header.thtml file of a theme. However, I've tried putting a little PHP in left block headers and footers and it seems to work fine. Is this unsafe for some reason?

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Whether it's safe or not depends on your PHP skills ;-) Geeklog only runs the header template through the PHP parser. Since the header template includes the left blocks, PHP will also work in left blocks. I would be surprised if it works in the footer, though ... bye, Dirk

Status: offline

beepy

Forum User
Newbie
Registered: 06/20/03
Posts: 3
Ah, I get it. Thanks. What I'm trying to do is dynamically create different frames for different blocks, depending on their position -- and I want it to work for both sides. I'd like to do this without hacking Geeklog itself, but looking at the plugin stuff I don't see any way. I suppose what I'll have to do is set a template variable specifying a block's position before each block is called on.

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073

There's a way to override block templates, used by themes that use different templates for the left and right blocks. It should be possible to extend that to individual blocks.

bye, Dirk


Status: offline

beepy

Forum User
Newbie
Registered: 06/20/03
Posts: 3
Great, thanks!

Status: offline

abridges

Forum User
Newbie
Registered: 08/18/02
Posts: 2
The link dirk made above to story "override block templates" 20020429092841722 is not working? Has this story been removed? I am trying to find information on changing the look of the left and right blocks. This story is cited several times but seems to have been removed.

I think i answered my own question. http://www.geeklog.net/forum/viewtopic.php?forum=10&showtopic=21070 answers the question.