The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Multiple Parameters for Conditionals
I am writing a basic PHP conditional script that uses vBulletin's global.php to display different messages for different user levels. I want to have the same message display for those who have userlevels 1 and 3. I know how to write it with elseif syntax, like:
PHP Code:
PHP Code:
Edit-accidentally left out a bit of the code. |
#2
|
||||
|
||||
You should be able to do something like this without problems:
PHP Code:
|
#3
|
||||
|
||||
Will this work?
PHP Code:
|
#4
|
|||
|
|||
Both methods work. Thanks for the help
|
#5
|
||||
|
||||
yes, but you should prefer the or, its easier to read
also this method works and looks much better for more than two groups: PHP Code:
|
#6
|
||||
|
||||
I was going to post that but since it was only 2, I went with the "or".
|
#7
|
||||
|
||||
*gg*
even when there are just two it's shorter as you can see and so it's easy to add another group, so why don't just give him the solution for make it easy and fast |
#8
|
||||
|
||||
You're right, I should have gone the other route. I usually use the "or" if it is only 2 though. Habit more than anything, I guess.
|
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|