The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
![]()
I am trying to have something display in memberinfo but only for certain usergroups. Is there an IF condition that will work for this? If this usergroup then yes else no something similar to that.
|
#2
|
||||
|
||||
![]()
Use this:
Code:
<if condition="is_member_of($bbuserinfo,x, y, z)"> Conditional code bit here... <else /> Default code bit here... </if> |
#3
|
||||
|
||||
![]()
I did try that in the memberinfo and it didnt work.
Here was my test, Code:
<if condition="is_member_of($bbuserinfo,6, 54, 85)"> yes <else /> no </if> |
#4
|
||||
|
||||
![]()
I'm actually using the code for many templates, including Members Info. What are you trying to do so I can try and replicate the problem?
|
#5
|
||||
|
||||
![]() |
#6
|
||||
|
||||
![]()
Cool. That's the exact code I've been using in my templates. Though, I learned it at vB.com.
![]() |
#7
|
||||
|
||||
![]()
Hmm, Ok I figured out what it is doing, but its still not solving my problem.
That code seems to be showing Yes to me on all profiles because I am usergroup 6 so it says ok I will show you YES. But to other members they see No. This in that simple test that is. Ok, to explain it simple, I have Teamspeak and VB integrated together. When a member registers and is approved for an account on my site, it automatically gives them access to teamspeak as the DB is shared. Now I have some settings built in profiles via admincp where I can grant them Server Admin, Channel Admin and many other options. Now my Admin usergroups by default have all this already in Teamspeak, but I can also toggle a checkbox in admincp if I want to grant specific rights to certain members. So I want a condition that will say, If apart of this usergroup say Yes they have this specific access or if box is checked it will also say yes. I already know the other conditionals, what I cant get to work is based off usergroup. The answer is based on the usergroup of that members I would be viewing not what usergroup I the view is in. |
#8
|
||||
|
||||
![]()
I think you may be looking for what I'm looking for. You don't want to limit per usergroup, (ie. yes to admin or no to members) you want to limit if the visitor has the usegroup option set to YES or No depending on your situation. Am I right in thinking this? This way you can go through your usergroups and set which usergroup can access your custom page, etc.
|
#9
|
||||
|
||||
![]()
I'm still not sure what you mean but you can try:
User: Code:
<if condition="$post[userid] == x"> Code:
<if condition="$post[usergroupid] == y"> |
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|