1
fallenturtle
group checking variable in PHP custom block

What I'm trying to do may be impossible... but hopefully its not!

First I'll start out by saying I'm using this hack:

https://xoops.org/modules/newbb/viewtopic.php?topic_id=32938&forum=5&post_id=221795#forumpost157003

Which does work for me. I have a group called ContentManagers.

I have a a menu called Dynamic Tree (http://code.gosu.pl/) which works pretty well. I have it setup in a custom block using PHP surrounded by echo tags (it won't work in an HTML block).

Now what I want to do is be able to have an item or two that is only viewable to those in the ContentManagers group.

So I tried using a if variable within the echo tags like so:

echo "<{if $in_ContentManagers_group ==1}> URL <{/if}>n";


According to Smarty debug, it does have an assign template variable that's {$in_ContentManagers_group} and gives a value of 1 when a user is in said group.

Debug is telling me part of the reason it may not be working is because it says that $in_ContentManagers_group isn't defined... so I thought maybe I need to make it a global variable, but I'm not sure where. I've tried it in a few places include mainfile.php, header.php, and class/xoopsblock.php, but none seem to be working.

Any ideas on what I'm doing wrong?

Thanks!

Login

Who's Online

327 user(s) are online (253 user(s) are browsing Support Forums)


Members: 0


Guests: 327


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits