View Full Version : Two Conditionals
JAuthement
12-24-2007, 12:12 PM
I know there's a way to do a checksum of two conditionals but I don't know the syntax. Could someone point me in the right direction?
If I'm as clear as mud on my description please PM me!!
Marco van Herwaarden
12-25-2007, 08:19 AM
Sorry but don't really understand. Please try to give an example.
nexialys
12-25-2007, 11:15 AM
actually, the logic would be if((X*Y) == (Y-A)) { $do = 'Z'; }
JAuthement
12-26-2007, 04:32 AM
Sorry but don't really understand. Please try to give an example.
Condition #1 Field5 = Branch of Service (5 options to select from)
Condition #2 Field6 = Component (Active Duty, Reserve, Retired, Veteran, Spouse, Parent)
If Field5 = True and Field6 = Spouse Then post Spouse.gif
If Field5 = True and Field6 DOES NOT = Spouse $post[field5].gif
Does that explain what I'm after a bit better?
Marco van Herwaarden
12-26-2007, 06:34 AM
So if field5 is true, then you want to show an image with the name "$post[field5].gif" (asuming the 5 is a typo and should be field6?)
JAuthement
12-26-2007, 02:37 PM
So if field5 is true, then you want to show an image with the name "$post[field5].gif" (asuming the 5 is a typo and should be field6?)
The clarification of what I need is getting more confusing than the original question :):)
Marco here is what I have:
field5 is a single selection drop down with 5 options: Marine Corps, Army, Air Force, Navy, Coast Guard
field6 is a single selection drop down with 6 options: Active Duty, Reserve, Retired, Veteran, Spouse, Parent
Currently my postbit_legacy is as follows for those specific fields:
<div align="center" class="smallfont">
<if condition="$post[field5]"><img src="/grunged/bos/$post[field5].gif"></if><br />
<if condition="$post[field6]">$post[field6]</if>
</div>
what I'm trying to achieve is that if spouse is selected in field6 then the graphic that would be place in field5 would be replaced with spouse [field6].gif
and where [field6] was would reflect the branch of service
In short if SPOUSE is selected in field6 I want the conditionals above swapped!!
Gray Matter
12-28-2007, 12:47 AM
Is this what you want?
<div align="center" class="smallfont">
<if condition="$post['field5']"><img src="/grunged/bos/<if condition="$post['field6'] == 'Spouse'">spouse<else />$post[field5]</if>.gif"></if><br />
<if condition="$post['field6']">$post['field6']</if>
</div>
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.