View Full Version : Hide for usergroup, not userid?
Luggruff
10-12-2006, 03:15 PM
See, I totally forgot what the usergroup bit for the same purpose as this code is:
<if condition="in_array($bbuserinfo['userid'], array(5,6,7,50))">
</if>
anyone that could remind me?
Zachery
10-12-2006, 03:27 PM
is_member_of($moo, foo)
ericgtr
10-12-2006, 03:31 PM
Try this
<if condition="in_array($bbuserinfo['usergroupid'], array(5,6,7,50))">
</if>
Luggruff
10-12-2006, 03:34 PM
is_member_of($moo, foo)
would help alot if you wrote it all out. =\
Zachery
10-12-2006, 03:44 PM
Well I gave you what you asked for.
<if condition="is_member_of($post/$bbuserinfo/$userinfo, X,Y,Z,A,B,C,D,E)"></if>
Luggruff
10-12-2006, 04:00 PM
Well I gave you what you asked for.
<if condition="is_member_of($post/$bbuserinfo/$userinfo, X,Y,Z,A,B,C,D,E)"></if>
So you did, only I had no clue when you wrote "is_member_of" as the code i used to use.. said "in array".
Anyways, ericgtr was just confirming what I suspected.. and it worked.
Thanks!
Zachery
10-12-2006, 07:47 PM
His method will only check users in a pimary usergroup, mine works for primary and secondary and doesnt require additional array/inarray to work.
Luggruff
10-13-2006, 02:54 AM
His method will only check users in a pimary usergroup, mine works for primary and secondary and doesnt require additional array/inarray to work.
Hmm ok. It's pretty much what I'm going for anyways though.
But I guess I could just learn to understand your method too.
So I am supposed to choose from $post, $bbuserinfo and $userinfo or should they all be listed like that?
<if condition="is_member_of($post/$bbuserinfo/$userinfo, X,Y,Z,A,B,C,D,E)"></if>
Zachery
10-13-2006, 04:20 AM
depends
$bbuserinfo to check the user viewing that page
$post for the postbit template for that user that posted
$useirnfo for the profile of that person.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.