Welcome to Geeklog, Anonymous Sunday, December 22 2024 @ 12:38 pm EST
Geeklog Forums
A Little Code Help Needed
Status: offline
samstone
Forum User
Full Member
Registered: 09/29/02
Posts: 820
I try to make Hit Counts only viewable by people who are in the "ViewHits" group. I put the following code in storytext.thtml, but the code shows up on page rather than getting executed.
{lang_views} {story_hits}
{!endif}
What am I missing?
BTW, I am trying this on Geeklog 2.0beta.
Thanks!
Sam
Text Formatted Code
{!!if SEC_inGroup('ViewHits') !!}{lang_views} {story_hits}
{!endif}
What am I missing?
BTW, I am trying this on Geeklog 2.0beta.
Thanks!
Sam
15
14
Quote
Status: offline
Laugh
Site Admin
Admin
Registered: 09/27/05
Posts: 1470
Location:Canada
We do not yet allow php in our templates so it will not work.
One possible work around could be to install the Autotags plugin. The new version allows for php so you could create your own autotag and then place that in the template to do the same thing.This may not work though if the template variables are figured out before autotags are executed in a template (I cannot remember if they are)
One of the Geeklog Core Developers.
One possible work around could be to install the Autotags plugin. The new version allows for php so you could create your own autotag and then place that in the template to do the same thing.This may not work though if the template variables are figured out before autotags are executed in a template (I cannot remember if they are)
One of the Geeklog Core Developers.
13
14
Quote
Status: offline
samstone
Forum User
Full Member
Registered: 09/29/02
Posts: 820
Thanks for the explanation. It works on GLFusion, so I thought it would work here too.
I came back to try Geeklog 2.0 because I am crazy about the multiple topic feature. So far I am enjoying it, even though I am still getting adjusted.
Peace!
Sam
I came back to try Geeklog 2.0 because I am crazy about the multiple topic feature. So far I am enjoying it, even though I am still getting adjusted.
Peace!
Sam
15
12
Quote
Status: offline
suprsidr
Forum User
Full Member
Registered: 12/29/04
Posts: 555
Location:Champaign, Illinois
There should be an easy way for advanced users and theme designers to be allowed to use php where ever they want in templates(at their own risk).
a $_CONF option perhaps.
Personally I just hack the code on a site/site basis, but I always have to look back to remember how I did something in one place to the next - and upgrading those sites is a *censored*.
FlashYourWeb and Your Gallery with the E2 XML Media Player for Gallery2 - http://www.flashyourweb.com
a $_CONF option perhaps.
Personally I just hack the code on a site/site basis, but I always have to look back to remember how I did something in one place to the next - and upgrading those sites is a *censored*.
FlashYourWeb and Your Gallery with the E2 XML Media Player for Gallery2 - http://www.flashyourweb.com
16
16
Quote
Status: offline
Dirk
Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
You can define your own template variables, which may be a workaround in some cases. See CUSTOM_templateSetVars() in system/lib-custom.php
In this case (displaying the number of hits for a story), it would require some reengineering, though. You would have to figure out yourself which story is currently being displayed since that information is not readily available in CUSTOM_templateSetVars.
bye, Dirk
In this case (displaying the number of hits for a story), it would require some reengineering, though. You would have to figure out yourself which story is currently being displayed since that information is not readily available in CUSTOM_templateSetVars.
bye, Dirk
13
12
Quote
All times are EST. The time is now 12: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