TinyPortal
Development => Support => Topic started by: Roknrol on August 19, 2007, 01:01:47 AM
At http://www.paganforum.com we've been having some minor issues with Block Permissions - I did a few searches but didn't find anything that fit my problem, so I apologize if this has been asked and I missed the solution.
We have *many* Membergroups at PF, most of which are supposed to view our Advertising blocks. We have two groups that should *not* see the Advertising blocks. When we have a member that is a member of both sets of groups, they can see the blocks - is there a way to prevent them from seeing the blocks regardless of what *other* groups they're in? See below for a bit better explanation :)
Group1 - should see the ads
Group2 - should see the ads
Group3 - should not see the ads
Group4 - should see the ads
If a member is part of Group1 and Group3, they can see the blocks. Is there a way to *prevent* seeing the blocks if they're a member of Group3 without having to remove them from the other groups?
Currently there is no feature built into TP that can do this. You can however do it with some PHP code.
global $user_info;
if ($user_info['groups'] == 1 || $user_info == 2 || $user_info == 4)
echo 'ad code in between these single quotes';
You would exchange the 1,2,4 with the actually group ID of your member groups.
Quote from: IchBin™ on August 19, 2007, 03:23:30 AM
Currently there is no feature built into TP that can do this. You can however do it with some PHP code.
global $user_info;
if ($user_info['groups'] == 1 || $user_info['groups'] == 2 || $user_info['groups'] == 4)
echo 'ad code in between these single quotes';
You would exchange the 1,2,4 with the actually group ID of your member groups.
TYVM! That's *perfect*!!!
ichbin this would be installed in the block yes?
Yes, or an article. As long as its a php one.
I fixed the code above, I had an error in it.