Log in

View Full Version : conditionals help


Blackhat
02-25-2009, 07:20 PM
Hi,

How can I write an "if" statement with two conditions in vbulletin.

Like this

If user is member of XX and user_profile_field = X
{
bla bla
}


Both must be true

Hope you understand :) Thanks for reading!

Lynne
02-25-2009, 07:31 PM
What plugin location are you using? And are you talking about the user viewing the page or the users who's page you are viewing (or post you are looking at)?

Blackhat
02-25-2009, 08:03 PM
I wanted to disable sidebars on the forum index only if you are a subscriber and have turned them off in your user cp, but I managed to figure out how to do it


<if condition="!is_member_of($vbulletin->userinfo,17) || $post['field34']">
sidebars here
</if>

Lynne
02-25-2009, 08:12 PM
I don't think $post[fieldx] is gonna work on the forum home page and $vbulletin->userinfo should only be used in php.. I think it needs to be:

<if condition="!is_member_of($bbuserinfo,17) || $bbuserinfo
['field34']">

Blackhat
02-25-2009, 08:56 PM
I cant get it to work, when using that its enabled anyway