vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Design and Graphics Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=168)
-   -   Two Conditionals (https://vborg.vbsupport.ru/showthread.php?t=166048)

JAuthement 12-24-2007 12:12 PM

Two Conditionals
 
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
Code:

if((X*Y) == (Y-A)) { $do = 'Z'; }

JAuthement 12-26-2007 04:32 AM

Quote:

Originally Posted by Marco van Herwaarden (Post 1408786)
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

Quote:

Originally Posted by Marco van Herwaarden (Post 1409282)
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:

Code:

<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?

HTML Code:

<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>



All times are GMT. The time now is 05:23 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01128 seconds
  • Memory Usage 1,727KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (1)bbcode_html_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (7)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete