The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
If condition "OR" problem
Hello,
I can't geht this condition to work: Code:
<if condition="!in_array($foruminfo['forumid'], array(369,479)) OR THIS_SCRIPT != 'search'"> They work separately but not together with the OR command. can you help me`? |
#2
|
|||
|
|||
I think you want AND instead of OR.
|
#3
|
|||
|
|||
wow your right .thx but in a other case OR worked for me hmm.
could you explain me why OR not work? because my logic is : exclude content if user visit forumdisplay.php with forum id 369,479 exclude content OR if user visit search.php. |
#4
|
|||
|
|||
Quote:
It can be tricky to convert an English description to code. But remember, you described the condition for excluding, but the if condition has to be true when you want to include the code. So you could negate the entire statement, like: Code:
condition="!(in_array($foruminfo['forumid'], array(369,479)) OR THIS_SCRIPT == 'search'")" which should work. Also, it's true that !(A OR B) is the same as !A AND !B, so that's why your code works with AND. |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|