The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
![]()
I have a row named "view_link" varchar(2) not null.
I'm using the conditional <if condition="is_member_of($bbuserinfo, $dlink['view_link'])"> If I make the value for "$dlink['view_link']" to "6" then I can see the link. If I make it "1,6,3" I cannot see it. |
#2
|
||||
|
||||
![]() Code:
<if condition="in_array($bbuserinfo[usergroupid], array(1,6,3))">..</if> |
#3
|
|||
|
|||
![]()
I'll try that.
It's weird because I did.. and it worked out fine but doesn't work with mysql. <if condition="is_member_of($bbuserinfo, 1,6)"> Edit: The only time it works with mysql if I only use one number such as "6" If I were to use multiple numbers then it won't work "1,4,6" |
#4
|
||||
|
||||
![]()
Hmm..try doing it with the is_member_of function, i.e.:
Code:
<if condition="is_member_of($bbuserinfo, array(1,6,3))">..</if> |
#5
|
|||
|
|||
![]()
It still only works with one number as the value.
Why couldn't this be simple? Now I have to find something that does it similiar to how I want to do it and do all this work. I think there's a hack where I can choose which forums I want something to into. |
#6
|
|||
|
|||
![]()
I think it has to do with your column type, try setting it to something like varchar(20) rather then varchar(2)....
/me isn't a genious at columns types though... |
#7
|
|||
|
|||
![]()
Still no luck..
Edit: I'm not at home but I may have found something that will work. PHP Code:
|
#8
|
|||
|
|||
![]()
can I bump this?
I don't understand why it doesn't work. If you want my whole plugin ask for it and I'll upload it. Edit: Here's the part to display stand-alone links PHP Code:
|
#9
|
|||
|
|||
![]()
What is $slink['member_of'] stored in the DB as (format & type)? I don't think you can pass is_member_of an array() in the templates. At least not via the PHP array() function. Not 100% sure on that though (not home to verify it).
|
#10
|
||||
|
||||
![]()
Yeah, I was also wondering if is_member_of could be used to specify mutliple membergroups, can't really add the statement 4 times because some people could end up with 4 times the code if they don't meet any of th e requirements.
What syntax should I use for an or statement? condition="!is_member_of($bbuserinfo, 11)" || condition="!is_member_of($bbuserinfo, 5)" does not seem to work. |
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|