Current Weather [VBIndex and Standalone] - 1.0
This modification is in the archives.
This is yet another weather block hack / intergration for VBIndex or for Stand Alone use (or both). It should work well with other portals like VBadvanced too without much modification either.
Why another one? I wanted a little more customization than some of the other released scripts have and looking around I found a php xml weather parser under GPL which I tweaked to use vb templates. Whats the catch? The zip code isn't dynamic for each user... its something you set which is better for local forums. This is also for the current weather only. The original script (included in zip) has a 5 day outlook which wasn't coverted over but can be tossed into a vb-powered page without much work. demo: http://nytalk.net/board/weather.php http://nytalk.net List of Variables for use: Zip Code = $zipcode Location = $weather_data[location] Forecast = $weather_data[forecast] Temp = $weather_temp Feel Like = $weather_feels Visibility = $weather_data[visibility] Pressure = $weather_data[pressure] Dew Point = $weather_dew UV = $weather_data[uvindex] Wind = $weather_data[wind] Reported at = $weather_data[reportedat] Last Updated = $weather_data[lastupdated] Graphic (edit the path to your weather icons below) HTML Code:
<img src="board/images/weather_icons/$weather_data[iconindex].gif" width="52" height="52">
Installaton for VBIndex 1. Open weather.php and find: PHP Code:
if (!isset($zipCode)){$zipCode = "10036";}
2. Open VBIndex.php and find: PHP Code:
require_once('./vbiconfig.php');
PHP Code:
require_once('./weather');
3. Create your template in a custom box of your choice. (I used box #2). The variables are listed above. Here is what I am using at the moment: HTML Code:
<table cellpadding="0" cellspacing="0" border="0" class="tborder" width="100%"> <tr> <td> <table cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%"> <thead> <tr> <td width="100%" class="tcat" style="text-align: center"><font size="3">NYC Weather</font></td> </tr> </thead> <tbody id="collapseobj_vbindex_customblock$box" style="$collapseobj_vbindex_customblock"> <tr> <td class="alt1"><img src="board/images/weather_icons/$weather_data[iconindex].gif" width="52" height="52">$weather_data[forecast]</td> </tr> <tr> <td class="alt1"><em><font size="2">Temp: $weather_temp (feels like $weather_feels)</font></em></td> </tr> <tr> <td class="alt1"><em><font size="2">Wind: </font></em><font size="2">$weather_data[wind]</font></td> </tr> </tbody> </table> </td> </tr> </table> <br /> 4. - Upload weather php file to the same place as your vbindex. - Upload the weather_icons folder and note the directory. 5. Your done! Installaton for Stand Alone Use 1. Open weather.php and find: PHP Code:
if (!isset($zipCode)){$zipCode = "10036";}
2. Create a new template and follow the instructions here for what to edit. 3. Use any of the above variables for your new template 4. Upload weather.php to your forums directory 5. Enjoy! Download This modification is archived and cannot be downloaded. |
Similar Mods
Miscellaneous Hacks Weather: Current Conditions | vBulletin 3.6 Add-ons |
Speech Bubbles (standalone) | Modification Graveyard |
vB Weather: Give your members current weather and forecasts! | vBulletin 2.x Full Releases |