Version: 1.00, by WreckRman2
Developer Last Online: Jul 2014
Version: 3.0.0
Rating:
Released: 03-29-2004
Last Update: Never
Installs: 10
No support by the author.
This is very, very simple addon done in less than 30 minutes. It can be made much better but it's a start. If someone else want to modify it and make it better please feel free to do so!
Step 1: Open your ACP and select "Add New User Profile Field", choose single line text box. Create new field titled "Zip Code".
Step 2: Open "User Profile Field Manager" and look for the Zip Code field number. In my instance it was field 10.
Step 3: Open your "index" template and place the following code where you want the weather conditions box to appear.
Code:
<!-- Weather Block -->
<table align="center" border="0" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" class="tborder" width="100%">
<tr>
<td class="tcat"><span class="smallfont"><b>$vboptions[blockbullet] Weather Conditions</b></span></td>
</tr>
<tr>
<td class="$getbgrow"><span class="smallfont">
<if condition="!$bbuserinfo['userid']">
<span class="smallfont">$vbphrase[a_not_a_member_yet]<br /><a href="$vboptions[bburl]/register.php">$vbphrase[a_register_now]</a> to show weather conditions.</span>
<else />
<if condition="$bbuserinfo[field10] !=''">
<a href="http://www.weatherroom.com/forecast/$bbuserinfo[field10].html"><img src="http://www.weatherroom.com/weather?forecast=zone&hwvtc=black&hwvbg=E1E4F2&pands=$bbuserinfo[field10]&config=png&alt=hwivzone&daysonly=1" alt="Weather for $bbuserinfo[field10] provided by weatherroom.com." border="0"></a>
<else />
<A HREF="$vboptions[bburl]/profile.php?do=editprofile">Add Zip Code</A> to show weather conditions.
</if>
</if>
</span>
</td>
</tr>
</table>
<br/>
<!-- End Weather Block -->
Step 4: IMPORTANT! Change all instances of $bbuserinfo[field10] to whatever your field number is. If it is number 13 change it to $bbuserinfo[field13]. If you forget this step it will not work!
Step 5: Save the changes and enjoy!
If your visitor isn't a member it tells them they must register to show the weather. If they are a member but haven't filled in the Zip Code field it tells the user they must edit their profile to add a zip code. If they have a zip code in their profile it will show a 5 day forecast of the weather in their area.
Here's the part with instructions:
1) Go here: http://www.weatherroom.com/cgi-bin/...ass&pass=tafINT
2) Select your country and city
3) Click "display Forecast/Conditions"
4) Top right you will see this "ICAO Used:" followed by a code - Place this code in your zip code field and you will see your local international forecast.
Here's the part with instructions:
1) Go here: http://www.weatherroom.com/cgi-bin/...ass&pass=tafINT
2) Select your country and city
3) Click "display Forecast/Conditions"
4) Top right you will see this "ICAO Used:" followed by a code - Place this code in your zip code field and you will see your local international forecast.