Welcome to Geeklog, Anonymous Thursday, December 26 2024 @ 09:38 pm EST
Geeklog Forums
Is PHP safe in block templates?
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?
7
7
Quote
Status: offline
Dirk
Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
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
5
8
Quote
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.
10
7
Quote
Status: offline
Dirk
Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
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
7
8
Quote
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.
I think i answered my own question. http://www.geeklog.net/forum/viewtopic.php?forum=10&showtopic=21070 answers the question.
7
10
Quote
All times are EST. The time is now 09:38 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