![]() |
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`? |
I think you want AND instead of OR.
|
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. |
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. |
All times are GMT. The time now is 03:15 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|