![]() |
membergroupids Conditional
I know the syntax for doing a conditional that checks equality for a groupid.
I'm trying to find out if there's a way to do a template conditional that returns true if a certain ID is in membergroupids WITHOUT being equal to it. I.E. I want an image to be posted to the left of the poster name on the postbit IF they are a member of a certain group OR a secondary member of a group. |
I do not know if the following will work for both primary and secondary usergroups, but anyways:
Code:
if condition="is_member_of($id_of_group)"> html here <else> other html here </if> |
Quote:
|
Well... I should have known that would have been a useless search. No such thing. Argh.
|
<if condition="is_member_of($var, X)"> user is part of X <else /> user is not part of x</if>
$var should contain membergroupids in it, such examples are $bbuserinfo and $post X should be the group you want to check for. |
Quote:
Code:
is_member_of($bbuserinfo['membergroupids'], 9) |
Quote:
This worked: Code:
<if condition="is_member_of($post, 9)"> |
All times are GMT. The time now is 01:44 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|