View Full Version : Hide Info From Certain Usergroups...
g0dfather1984
06-02-2010, 06:33 PM
Say I wanted to hide something from a usergroup, I tried this but it didn't work.
<vb:if condition="$bbuserinfo['usergroupid'] == '19'">
</vb:if>
What would be the proper coding to hide something from a usergroup?
I copied Lynne's code from hiding recent activity on an old 3.8 thread but now am trying to do the same for another thing in VB 4.
Sorry if this is a little screwed up. I've edited a few times and never reorganized it.
Xencored
06-02-2010, 06:39 PM
<vb:if condition="is_member_of($bbuserinfo,1,2,3,4,5,6)"> info </vb:if>
g0dfather1984
06-02-2010, 06:46 PM
<vb:if condition="is_member_of($bbuserinfo,1,2,3,4,5,6)"> info </vb:if>
No, it still shows, sorry.
Xencored
06-02-2010, 06:47 PM
No, it still shows, sorry.
This is the right code 100%
1,2,3,4,5,6 change this to the Usergroups Allowed to see
g0dfather1984
06-02-2010, 06:57 PM
This is the right code 100%
1,2,3,4,5,6 change this to the Usergroups Allowed to see
That's what I thought too but for some reason it's still appearing. I am trying to hide this code from a certain usergroup:
https://vborg.vbsupport.ru/showthread.php?p=2047172
Xencored
06-02-2010, 07:04 PM
That's what I thought too but for some reason it's still appearing. I am trying to hide this code from a certain usergroup:
https://vborg.vbsupport.ru/showthread.php?p=2047172
<vb:if condition="is_member_of($bbuserinfo,1,2,3,4,5,6) AND $post['isfirstshown']" >
<li class="firstpost_advert_container"><div class="firstpost_advert">
REPLACE THIS WITH YOUR ADSENSE CODE HERE
</div>
</li>
</vb:if>
g0dfather1984
06-02-2010, 08:19 PM
Sorry for the delay in response but it's still showing and it tells me this:
"adding child to non-existent node!"
Xencored
06-02-2010, 08:31 PM
Sorry for the delay in response but it's still showing and it tells me this:
"adding child to non-existent node!"
You have messed up somewhere than mate
there is no "non-existent node!" in the code above
borbole
06-02-2010, 08:38 PM
<vb:if condition="is_member_of($bbuserinfo,1,2,3,4,5,6)"> info </vb:if>
If I understood the OP correctly, he wants to hide stuff from those usergroups and not show it. This conditional above, will show whatever he is trying to hide, to those groups. Try to add the non true operator, !, when checking for the gids and that should fix it.
g0dfather1984
06-02-2010, 08:40 PM
Well, I got rid of the node. I had an extra </vb:if> that wasn't needed but it still shows.
Xencored
06-02-2010, 08:43 PM
Well, I got rid of the node. I had an extra </vb:if> that wasn't needed but it still shows.
Hard refresh Alt+f5
if that dont work pm me your site
borbole
06-02-2010, 08:43 PM
Well, I got rid of the node. I had an extra </vb:if> that wasn't needed but it still shows.
Try my suggestion above, that should fix it.
Xencored
06-02-2010, 08:45 PM
If I understood the OP correctly, he wants to hide stuff from those usergroups and not show it. This conditional above, will show whatever he is trying to hide, to those groups. Try to add the non true operator, !, when checking for the gids and that should fix it.
Well he can use that also to show only to the groups and leave out the ones he does not no?
plus i did say "Usergroups Allowed to see"
This is the right code 100%
1,2,3,4,5,6 change this to the Usergroups Allowed to see
g0dfather1984
06-02-2010, 08:51 PM
OMG, I'm an idiot and that's all I'll say.
Thank you both you for taking the time to helping me figure this out.
It is greatly appreciated and I apologize for the idiot in me.
Xencored
06-02-2010, 08:51 PM
OMG, I'm an idiot and that's all I'll say.
Thank you both you for taking the time to helping me figure this out.
It is greatly appreciated and I apologize for the idiot in me.
What did you do wrong than? :D
g0dfather1984
06-02-2010, 08:53 PM
Well he can use that also to show only to the groups and leave out the ones he does not no?
plus i did say "Usergroups Allowed to see"
What did you do wrong than? :D
... the bold is all I'll say.
Sorry again, lol.
Xencored
06-02-2010, 08:55 PM
... the bold is all I'll say.
Sorry again, lol.
lol np happy you got it working :)
borbole
06-03-2010, 02:53 PM
The most important thing is that you got it to work. Glad to hear that :)
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.