The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
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. |
#2
|
||||
|
||||
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> |
#3
|
||||
|
||||
Quote:
|
#4
|
||||
|
||||
Well... I should have known that would have been a useless search. No such thing. Argh.
|
#5
|
||||
|
||||
<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. |
#6
|
||||
|
||||
Quote:
Code:
is_member_of($bbuserinfo['membergroupids'], 9) |
#7
|
||||
|
||||
Quote:
This worked: Code:
<if condition="is_member_of($post, 9)"> |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|