The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
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> |
#2
|
|||
|
|||
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&tStyle=whteYell&logo=0&zipcode={vb:raw bbuserinfo.field12}&lang=eng&size=14&theme=silver&metric=0&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> |
#3
|
||||
|
||||
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. |
#4
|
|||
|
|||
Thanks guys!! I really appreciate the help.
|
#5
|
||||
|
||||
Ditto.
Quote:
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|