View Full Version : Help with conditionals please!


MonkeyBone
25th February 2005, 07:43 PM
I want a link to show only to users from sponsor usergroup, premiium members usergroup and all access usergroup. (and of course the staff)

not to everybody else.

how would that be?

<if conditional="bbuserinfo[usergroupids] == 51,56,71,82"> <a href="link">only you can click this!</a> </if>

something like that, but that wont work of course, i do not understand conditioanls HAHA

kall
26th February 2005, 04:05 AM
<if condition="in_array($bbuserinfo[usergroupid], array(51,56,71,82))"><a href="link">Only you can click this!</a></if>

Like that. :)

ja3
26th February 2005, 04:06 AM
can you just use php functions in the condition?

kall
26th February 2005, 04:18 AM
Err...no, you can't..unless they have been pre-defined in adminfunctions_template.

As far as I know, anyway. The php version looks like:


if (!in_array($bbuserinfo['usergroupid'], array(X, Y, Z))) {
$vboptions['allowchangestyles'] = 0; **ORWHATEVER**
}</font></font>

Floris
27th February 2005, 02:20 AM
The vBulletin.com/docs/html has syntax & variable explanations, examples.