View Single Post
Old 09-Jul-2007, 03:41 AM   #2 (permalink)
Anilrgowda
Administrator
 
Anilrgowda's Avatar

Posts: 18,715
Join Date: Jan 2006
Rep Power: 10 Anilrgowda is on a distinguished road

IM:
Default Re: Common and handy conditionals

A couple more very useful conditionals:

PHP Code:
<if condition="in_array($forumid,array(2,5))">Whammo!</if> 
If the forumids (plural) = 2 or 5, print Whammo!

PHP Code:
<if condition="$forum[forumid] == 3">Zap!</if> 
If the forumid (singular) = 3, print Zap!
Code:

PHP Code:
<if condition="is_member_of($bbuserinfo, 4, 8, 12)">Crash!</if> 
If the user is a member of these groups with the IDs of 4, 8, or 12, print Cras
h!

Code:

PHP Code:
<if condition="in_array($bbuserinfo[userid], array(7,14,21))">Zing!</if> 
If the user's IDs are 7,14, or 21, print Zing! Negatives
Put a ! in front of a conditional statement to make the event happen only if it is NOT true.

Example:
Code:

PHP Code:
<if condition="!$forum[forumid] == 3">Pow![/if> 
If the forum ID is NOT 3, print Pow!
Anilrgowda is offline   Reply With Quote