![]() |
Weather Block for vBadvanced
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 --> 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. You can see it live on my site at http://www.rcflying.net |
Excellent!! I love it!! Unfortunatelyl, I don't have vBadvanced... what about vBPortal?
|
it would be cool if the site support provence for canada :P otherwise cool hack even though I can't use it :P
|
will it display the weather conditions for Asian users (in any where )? if not can you edit for that ?
|
Quote:
|
Thanks Indy!
Apparantly the scripts gather weather data from http://www.weatherroom.com/ I found that the supply weather data from Norway also, but how do I set the link to collect the forcast? Is there a location where I could get the URL? http://www.weatherroom.com/ works internationaly, so you could go there to see if your location is included... :) |
OK!
It works with airport codes instead of zip-codes... So the users has to enter a 4-letter airportcode instead of the us zipcode... These airport codes are not logic, so a scrollmenu were one can preset names that correspond to the codes would make this usefull... :) (empty menues that we could populate ourself...) Possible? My nearest airport is Sogndal-Haukasen - the code is ENSG and the weather is: http://www.weatherroom.com/forecast/ENSG.html :D |
Nice hack ---- Very nice -- BUT
2 problems...... 1. What do we do with non-us members; 2. When there isnt a zip code, and someone clicks on the box where it says "Add Zip Code to show weather conditions." an error page comes up saying page not found. SO its not directing to the profile page. The reaso for this is in the code -- some people do not have the software installed in a 'forums' directory - so you should instruct people to change this to suit their setup. |
:ermm: For international users there would not be any forcast, just what the weather is... officially... :)
|
Great hack.
I wanted to do this for my vBadvanced, but couldn't find a decent weather feed. |
This looks awfully familiar to the tip I posted over on www.vbadvanced.com about how to add the Weatherroom forecast to the portal. :rolleyes:
http://www.vbadvanced.com/forum/show...73&postcount=5 |
I've never seen your "tip" until you just posted it and while they may look similar one has to ask how much different can a super simple thing like this be. Besides yours just shows one default city... mines allows the members to add their own zip code to show each members own city. I go to your website and see the weather for Nashville. What good does that do me if I line in Indianapolis?
|
Quote:
2. I changed the code to $vboptions[bburl] instead of forums. Remember guys I wrote this for my own use and the only reason I posted it here was to share it with anyone who wanted to modify it for their use. I'm not going to add to it but feel free to modify what I have already and forget this Simpons guy who thinks I stole his code. |
Quote:
|
it's useless with anyone outside US or Euroup
|
Nice job.
Installed. I wasn't using custom2, so I dumped the code into that template, works fine. |
Then you have 2 options... move to the US or re-write it to your liking. :D
|
I said it's useless meant that I've tried to rewrite it but there's no chance to make it like weather conditions for US
except there're some more sites for Asian weather conditions ( display similarly with US-EU's weather conditons ) move to US, no |
Quote:
|
go cry about it?
if u had such a great idea, you should have released it. i garuntee your not the first to have thought of or mention the idea. |
Quote:
|
nice... that was easy! 30 minutes is a little over exaggerated lol more like 10 tops.. and i'm pHp illiterate :)
nice job... wish there was a way for non u.s. users on my site to be able to use it though... |
Works with VBIndex to...nice hack
|
any way to get this to show the current moon phase on vba rather than clicking the link?
|
Awesome hack!!!
|
Quote:
|
Quote:
|
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. And here's a link to the hack thread: http://www.vbadvanced.com/forum/showthread.php?t=1012 |
Quote:
|
Quote:
|
Quote:
|
I like this, but it says my zip isn't found . . . I live in a county with over $1m people . . .
The location you selected to search for was not found. HAMweather 3 by default, normally can display the information for locatons with in the US that have zipcodes, and international locations which have an valid internationally reporting ICAO station. If you entered in a location of a small town of location, it may be that this location is not in the current HAMweather 3 database. If you continue to have trouble with this location you may email the name of the location and what major city or county it is close to to the HAmweather administrator at hw3admin@hamweather.com for possible future addition to the HAMweather database. |
All times are GMT. The time now is 04:18 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|