The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
Show Mutiple Ranks in postbit
Hello Everyone,
Got a quick question. I have multiple usergroups setup and many of them have ranks Even Mods and up can join the opther groups Mods and up also have rank images I have it working but basically doing an if statement show image Here is an example: Code:
<if condition="is_member_of($userinfo, 24)"> <img src="http://www.tech-unity.com/forums/images/ranks/premium.jpg" ALT="Premium Member"> </if> but, if a regular user subscribes to a group with this rank image, it is going to show up twice in there postbit, once in the normal rank place and once whre I added this code. so, I am thinking, and this is what I would like your help with. if usergroup 5 or 6 or 7 and 24 show the image /if Any ideas on how to do this |
#2
|
||||
|
||||
Quote:
$staffgroups = array(5 or 6 or 7); Then changed the postbit code to this <center> <if condition="is_member_of($userinfo, 24, $staffgroups)"> <img src="http://www.tech-unity.com/forums/images/ranks/premium.jpg" ALT="Premium Member"> </if> </center> But still no glory. Can anyone help me with this? |
#3
|
|||
|
|||
PHP Code:
PHP Code:
|
#4
|
||||
|
||||
I believe you will have to use something in the line of...
Code:
<if condition="is_member_of($userinfo, 5) OR is_member_of($userinfo, 6)"> <img src="http://www.tech-unity.com/forums/images/ranks/premium.jpg" ALT="Premium Member"> </if> |
#5
|
|||
|
|||
I think you can also use an array as parameter oof is_member_of
|
#6
|
||||
|
||||
To bad you guys dont have multiquote installed here
Anyway, I've tryed this Code:
<if condition="is_member_of($userinfo, 5) OR is_member_of($userinfo, 6)"> <img src="http://www.tech-unity.com/forums/images/ranks/premium.jpg" ALT="Premium Member"> </if> [code]$staffgroups = array(5 or 6 or 7);[/code] as well as this Code:
$staffgroups = array(5, 6, 7); Someone posted this Code:
<if condition="is_member_of($post, 24) AND $post['usergroupid'] != 24"> at vbulletin.com I'll try it next and see what happens. I cant believe this is that hard. LOL Thanks for the thoughts |
#7
|
||||
|
||||
Unless I'm mistaken you can't use an array in is_member_of unless you have merk's 'is_member_of' modification.
I'm under the impression this is not the case. tomshawk, What exactly are you trying to achieve? Write the function out in a sentence. eg. if user is in group 5 do not include etc, etc |
#8
|
||||
|
||||
Quote:
If user is in group 5 or 6 or 7 and group 24 (show image) Explanation: I have a seperate group for premium members If a regular user pays the premium charge, they get a rank image. That works great. but, I have a staff image for mods and above. I want this image to show up in there postbit as a second image, but, right now, with the codes above, the regular users in the premium users group have 2 images. I'm trying to avoid the premium members from seeing the image twice, but only mods that have paid actually have the second image. Maybe this would be easier for everyone to understand if secondary group is premium group number (24) show image /if but, only secondary group, if the primary group is 24, I dont want it to display the image |
#9
|
||||
|
||||
I don't know if this will work but try...
Code:
<if condition="is_member_of($userinfo, 10)"> <if condition="is_member_of($userinfo, 5) OR is_member_of($userinfo, 6) OR is_member_of($userinfo, 7)"><img src="http://www.tech-unity.com/forums/images/ranks/premium.jpg" alt="Premium Member" /></if> </if> |
#10
|
|||
|
|||
Quote:
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|