The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
Secondary Usergroups Question
Hey everyone.
I have another odd question I hope someone can answer. I just started to use a template mod for adding images based on usergroups. The following is an example of what I have: Code:
<if condition="$post[usergroupid] == 10"> <img src="fainte/postbit/crimson_blades.gif" border="0"> <br> </if> <if condition="$post[usergroupid] == 11"> <img src="fainte/postbit/crimson_blades_officer.gif" border="0"> <br> </if> |
#2
|
||||
|
||||
Try this....it's also XHTML compliant
Code:
<if condition="is_member_of($vbulletin->userinfo, 10)"> <img src="fainte/postbit/crimson_blades.gif" alt="" border="0" /> <br /> </if> <if condition="is_member_of($vbulletin->userinfo, 11)"> <img src="fainte/postbit/crimson_blades_officer.gif" alt="" border="0" /> <br /> </if> |
#3
|
||||
|
||||
Quote:
|
#4
|
||||
|
||||
Ok, try THIS one, lol
HTML Code:
<if condition="in_array($bbuserinfo[usergroupid], array(10))"> <img src="fainte/postbit/crimson_blades.gif" alt="" border="0" /> <br /> </if> <if condition="in_array($bbuserinfo[usergroupid], array(11))"> <img src="fainte/postbit/crimson_blades_officer.gif" alt="" border="0" /> <br /> </if> |
#5
|
||||
|
||||
It has the original problem. it shows the primary but not the secondary
|
#6
|
||||
|
||||
ERRR!!! I used to know a conditional that checked if the users groups were primary and seconday but I can't remember it. I THOUGHT it was the first one I posted. The bad thing about these, is there's so many ways to do it. So, try this one...
HTML Code:
<if condition="is_member_of($bbuserinfo, 10)"> <img src="fainte/postbit/crimson_blades.gif" alt="" border="0" /> <br /> </if> <if condition="is_member_of($bbuserinfo, 11)"> <img src="fainte/postbit/crimson_blades_officer.gif" alt="" border="0" /> <br /> </if> I'm assuming you got this working? |
#7
|
||||
|
||||
Quote:
The only issue is that everyone else on that page has the same thing now. Any ideas? |
#8
|
||||
|
||||
What do you mean?
|
#9
|
||||
|
||||
There are two people registered ATM. We are both in userID 9. I have added myself to 9 with 10 and 11 as secondaries. The three images now show up where I want them but for whatever reason all three show up in his postbit too even though he isn't in all three.
|
#10
|
||||
|
||||
Not sure about the answer to that one. Have you checked his profile in the AdminCP to make sure the other user doesn't have any additional usergroups selected?
|
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|