Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 Conditional challenge (several ORs + one AND (of ORs))
Sector Offline
Junior Member
**
Posts: 6
Joined: May 2012
Post: #1
Conditional challenge (several ORs + one AND (of ORs))
First, congratulations for this great plugin.

Now the challenge: Can I add an AND to these ORs?

Quote:<if ($forum['fid'] == 11) || ($forum['fid'] == 12) || etc... etc...  || ($forum['fid'] == 20) then>
Event 1
<else>
Event 2
</if>

I need an AND that will be mandatory condition for Event1 to happen. In this case Theme ID must be, say, "2" OR "4".

And there's a catch: many people use the default theme (ID=0). Thus the condition must know what's the Theme currently applied as default too, because it must always apply when Theme ID #2 or Theme ID #4 are being displayed.

So, what I want is something like IF ((forum=1 or forum=2 or forum=3, etc) AND (theme=2 OR theme=4)) THEN event 1, ELSE event 2.

Tricky, hm?
(This post was last modified: 05-30-2012 01:21 PM by Sector.)
05-30-2012 12:31 PM
Find all posts by this user Quote this message in a reply

« Next Oldest | Next Newest »

Messages In This Thread
Conditional challenge (several ORs + one AND (of ORs)) - Sector - 05-30-2012 12:31 PM

 Standard Tools
Forum Jump: