View Full Version : IF or IF or
question?
05-03-2008, 03:16 PM
How would I go about doing:
<if condition="THIS_SCRIPT == 'member' or 'showthread' or 'index'">
is that valid ? I need something along the lines of that.
Medina
05-03-2008, 03:25 PM
This will not work, that`s what I know. But where are you searching for exactly?
Stickers
05-03-2008, 03:33 PM
How would I go about doing:
<if condition="THIS_SCRIPT == 'member' or 'showthread' or 'index'">
is that valid ? I need something along the lines of that.
this is the right way ;)
<if condition="in_array(THIS_SCRIPT, array(index,showthread,member,usercp,private,profi le,subscription))">
Andreas
05-03-2008, 03:34 PM
Use in_array or
<if condition="THIS_SCRIPT == 'member' OR THIS_SCRIPT == 'showthread' OR THIS_SCRIPT == 'index'">
Opserty
05-03-2008, 03:47 PM
Correction to the code provided by Stickers...
<if condition="in_array(THIS_SCRIPT, array('index', 'showthread', 'member', 'usercp', 'private', 'profile', 'subscription'))">
Strings should always be quoted ;)
Stickers
05-03-2008, 05:54 PM
Thanks for the info Opserty :)
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.