PDA

View Full Version : Can I use a if condition inside a thread?



ryancooper
Wed 14th Jan '09, 12:45pm
<if condition="is_member_of($vbulletin->userinfo, array(1, 2, 3, 4, 9, 14, 15,16,12))">

Is there a way i can use the above condition inside a thread to show certain parts of the thread to usergroup x and hide it from usergroup y?

Thanks?

Lynne
Wed 14th Jan '09, 1:17pm
Your condition is wrong:


<if condition="is_member_of($bbuserinfo, 1, 2, 3, 4, 9, 14, 15,16,12)">

ryancooper
Thu 15th Jan '09, 10:22am
Strange it didn;t work. As a admin i can still see the part I have in the IF statement.

I am trying to do this inside a post not in a template... Not sure if that is part of the problem?

Wayne Luke
Thu 15th Jan '09, 10:32am
You cannot use conditionals in posts. They will not be parsed to PHP.

ryancooper
Thu 15th Jan '09, 10:46am
That explaines it.