vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=252)
-   -   Help with conditionals (https://vborg.vbsupport.ru/showthread.php?t=228336)

iow_bg 11-18-2009 10:34 PM

Help with conditionals
 
I am trying to make weather page based upon members profile information... This is the coding I have for VB3.... What do my conditionals need to be? I've read the articles on the new vb:raw and vb:if but I cannot get the information to display right.

Any help would be appreciated!!

My current vb3 coding:
Code:

<if condition="!$bbuserinfo['userid']">
<span class="weather">Registered members can see their local weather forecast here.<phrase
1="$vboptions[bburl]">$vbphrase[not_a_member_yet_register_now]</phrase></span>
<else />
<if condition="$bbuserinfo[field12] !=''">

<div>
<div style='width: 630px; height: 440px; background-image: url( http://vortex.accuweather.com/adcbin/netweather_v2/backgrounds/silver_630x440_bg.jpg ); background-repeat: no-repeat; background-color: #86888B;' ><div style='height: 420px;' ><script src='http://netweather.accuweather.com/adcbin/netweather_v2/netweatherV2.asp?partner=netweather&tStyle=whteYell&logo=0&zipcode=$bbuserinfo[field12]&lang=eng&size=14&theme=silver&metric=0&target=_self'></script></div>
</div>

<else />Add your <A HREF="$vboptions[bburl]/profile.php?do=editprofile">Zip Code</A> to show weather forecast.
</if>
</if>


ForumsMods 11-18-2009 10:47 PM

Code:

<vb:if condition="!$bbuserinfo['userid']">
<span class="weather">Registered members can see their local weather forecast here.{vb:rawphrase not_a_member_yet_register_now, vboptions.bburl}</span>
<vb:elseif condition="$bbuserinfo['field12'] != ''" />
<div>
<div style="width: 630px; height: 440px; background-image: url(http://vortex.accuweather.com/adcbin/netweather_v2/backgrounds/silver_630x440_bg.jpg); background-repeat: no-repeat; background-color: #86888B;">
<div style="height: 420px;">
<script src="http://netweather.accuweather.com/adcbin/netweather_v2/netweatherV2.asp?partner=netweather&amp;tStyle=whteYell&amp;logo=0&amp;zipcode={vb:raw bbuserinfo.field12}&amp;lang=eng&amp;size=14&amp;theme=silver&amp;metric=0&amp;target=_self"></script>
</div>
</div>
<vb:else />
Add your <a href="{vb:raw vboptions.bburl}/profile.php?{vb:raw session.sessionurl}do=editprofile">Zip Code</a> to show weather forecast.
</vb:if>


Paul M 11-18-2009 10:48 PM

Conditionals are pretty much unchanged, you just need to add the vb: to the <if>, </if> and </else> (e.g. <vb:if>)

Edit: As shown in the example above. :)

iow_bg 11-18-2009 10:52 PM

Thanks guys!! I really appreciate the help.

kall 11-20-2009 07:04 AM

Quote:

Originally Posted by iow_bg (Post 1916891)
Thanks guys!! I really appreciate the help.

Ditto.

Quote:

Conditionals are pretty much unchanged, you just need to add the vb: to the <if>, </if> and </else> (e.g. <vb:if>)
That statement right there, saved me a lot of time. :D


All times are GMT. The time now is 03:02 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.01138 seconds
  • Memory Usage 1,724KB
  • 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
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)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