Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 Programming Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 11-18-2009, 10:34 PM
iow_bg iow_bg is offline
 
Join Date: Jul 2006
Posts: 8
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default 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>
Reply With Quote
  #2  
Old 11-18-2009, 10:47 PM
ForumsMods ForumsMods is offline
 
Join Date: Aug 2007
Location: Argentina
Posts: 667
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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>
Reply With Quote
  #3  
Old 11-18-2009, 10:48 PM
Paul M's Avatar
Paul M Paul M is offline
 
Join Date: Sep 2004
Location: Nottingham, UK
Posts: 23,748
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #4  
Old 11-18-2009, 10:52 PM
iow_bg iow_bg is offline
 
Join Date: Jul 2006
Posts: 8
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks guys!! I really appreciate the help.
Reply With Quote
  #5  
Old 11-20-2009, 07:04 AM
kall's Avatar
kall kall is offline
 
Join Date: Apr 2004
Location: New Zealand
Posts: 2,608
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by iow_bg View Post
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.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 02:14 PM.


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.03747 seconds
  • Memory Usage 2,200KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (2)bbcode_code
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (5)post_thanks_box
  • (5)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (5)post_thanks_postbit_info
  • (5)postbit
  • (5)postbit_onlinestatus
  • (5)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete