PDA


View Full Version : Weather Module


Pages : 1 [2] 3 4

BubbleHead
11-13-2004, 05:13 AM
Nevermind, I found my answer here. (http://vbadvanced.com/forum/showthread.php?t=494)

303Nate
11-13-2004, 03:13 PM
Thank you!

PamBlizzard
11-13-2004, 07:22 PM
Just installed this, it works right off the bat, thanks!

memobug
11-13-2004, 11:38 PM
This module looks great and probably meets most people's needs.

I thought the weatheroom.com output looked very very familiar - the service appears to be using HAMWEATHER 3 (http://www.hamweather.net/hw3/hw3php/) with the HWIMAGE plugin.. So if you have issues with load time delays or something, you can install Hamweather right on your server. I've used Hamweather2 for years. It worked great. I think you'd need to upgrade to HW3 to use this hack. It's actually free if you leave their link in, but you'd need to get a $20 one-month subscription to their database to download the zip code data. I downloaded it once - you don't need to resubscribe unless you are running some enterprise thing where your zipcode database needs to be 110% accurate.

The advantages would be
1. faster page load
2. all content comes from your website so it loads together
3. they never leave your site if they follow the link.
4. weather images get cached between updates, so it's even quicker to load.
5. You can configure display in various ways, including allowing user to set a cookie with his preferred settings.

Regards,

Matt

memobug
11-13-2004, 11:52 PM
something i just noticed is if you use international codes instead of u.s. codes you get different weather output... i've only tested with quebec

dosn't show the Hi/ Low's as well as not being a 5 day forecast and being morning -> evening....

Yes, that helps pin it down. Since Hamweather can accept

"Place, State", US Zip Code or ICAO**

You can use any of those. For example

http://www.weatherroom.com/weather?forecast=zone&hwvtc=black&hwvbg=FFFFFF&pands=San Francisco, CA&config=png&alt=hwivzone&daysonly=1 (http://www.weatherroom.com/weather?forecast=zone&hwvtc=black&hwvbg=FFFFFF&pands=Saratoga, CA&config=png&alt=hwivzone&daysonly=1)

ICAO=International Civil Aviation Organization

You can look up ICAOs here: http://www.jfast.org/Tools/Port2PortAirDist/GeoLookup.asp

A more user friendly link would be helpful, but enter the country name and read it off the chart.

clearchannel
11-14-2004, 07:58 PM
I thought the weatheroom.com output looked very very familiar - the service appears to be using HAMWEATHER 3 (http://www.hamweather.net/hw3/hw3php/) with the HWIMAGE plugin.. So if you have issues with load time delays or something, you can install Hamweather right on your server. I've used Hamweather2 for years. It worked great. I think you'd need to upgrade to HW3 to use this hack. It's actually free if you leave their link in, but you'd need to get a $20 one-month subscription to their database to download the zip code data. I downloaded it once - you don't need to resubscribe unless you are running some enterprise thing where your zipcode database needs to be 110% accurate.

The advantages would be
1. faster page load
2. all content comes from your website so it loads together
3. they never leave your site if they follow the link.
4. weather images get cached between updates, so it's even quicker to load.
5. You can configure display in various ways, including allowing user to set a cookie with his preferred settings.

Regards,

Matt

I managed to get hamweather set up and running on my server. I have not yet subscribed to updating the database. Can you explaine what needs to be changed for the weather block to use this program vs weather room?

Thanks in advance

memobug
11-14-2004, 09:49 PM
I managed to get hamweather set up and running on my server. I have not yet subscribed to updating the database. Can you explaine what needs to be changed for the weather block to use this program vs weather room?
I did the same thing last night. It is actually pretty simple, and depending on your usage, you might not even need to subscribe.

1. First get hamweather running. that part is relatively simple. I think there was just one edit to use the flatfile PHP version over the MySQL. I really recommend flatfile unless you are running enterprise stuff with tens of thousands of users or something. Flatfile is easy to debug and maintain. I let my HW2 flatfile version run for 2 years with no maintenance whatsoever.

2.Next there is an HW3Image hack you need to install. That one is just slightly more complex. Get that from the download area and make sure you get the PHP version for HW3. If I recall correctly last step is you have to edit a HW template with a single line, but the instructions are good.

That hack will create on the fly weather images with caching and all kinds of coolness.

3. Lastly you need can get the vertical forecast display from the same download area. It has an odd name, but it's the only one with like "verticalzone" in the name. It's very easy to install that single file in your template directory as instructed. Let me know if you can't find it.

There is also a horizontal 7 day forecast? I think in the same templates directory. That could be cool as a center module.

Anyway once it's installed all you need to do to get it working with the hack is replace the first part of the image path in yourvbweather template with a path - I'm talking about changing the http://mydomain.com/path-to/hw3.php? part only. Keep all the other tidbits after it intact.

I was able to get all the zipcode based vertical displays working for US zip codes with just the basic installation. Didn't need to subscribe, but if you want all the ICAO data you'd probably need to.

Cool part is this: once you have it running on your own server, you can customize the hamweather templates so the text and messages (and the displayed width) can be changed to make it more appropriate for your own website.

my image tag looks like this

http://weather.mydomain.com/hw3.php?forecast=zone&hwvtc=black&hwvbg=F0F0F0&pands=95032&config=png&alt=hwivzone&daysonly=1

and coming off my server, looks exactly the same
http://weather.bonsaitalk.com/hw3.php?forecast=zone&hwvtc=black&hwvbg=f0f0f0&pands=95032&config=png&alt=hwivzone&daysonly=1

Next thing I want to do is modify the code just slightly so it doesn't grumble when I pass it a vbStyle variable that has the background color element in it. vB is generating #FFFFFF for white, for example and the HW script wants FFFFFF with no #.

Regards,

Matt

After testing those three steps independently you should be able to get hwimage reporting your zone forecast and the vertical zone

I should point out that there are other templates you could use. More or fewer days, "weather station" local conditions, etc.

clearchannel
11-17-2004, 09:20 PM
Memobug,

I managed to get it installed even with their horrible documentation...LOL You on the other hand provided get instructions.

I see you image above the easy to read, mine on the other hand is crunched.

http://www.rottweiler.net/weather/hw3.php?forecast=zone&hwvtc=black&hwvbg=E1E4F2&pands=33068&config=png&alt=hwivzone&daysonly=1

Any suggestions to fix this?

I see you have to manually set your cookies in the Your Weather (Options).

Thanks again for the termendous help.

clearchannel
11-18-2004, 07:18 AM
I guess downloading the weather database must have had something to do with the image. It's working perfectly now :eek:

I guess it depends on the time of day, it's messed up again.....

memobug
11-22-2004, 02:20 PM
It might depend on the weather, too. It doesn't take much room for Mostly Sunny vs. Chance of T-storms.

You can edit the actual template, and perhaps change the font or the font size. It's the template that you uploaded to the templates directory for this module. It might also be that the font you are using is not on the server? Not sure if it needs to be, though. Maybe play with the width setting. I think the template is set narrower by 30-40 pixels than the cmps module, so there is some room to grow.

Regards,

Matt

C_P
11-22-2004, 11:24 PM
Great mod! Ranked a 5 star. So far no issues... so far ;)

pennylessz28
11-24-2004, 07:56 PM
Awesome, works like a champ!

98EXL
12-01-2004, 02:35 PM
once I get some things squared away with my site, *cough* PHP5 *cough* I will have to try this one out!

Can you set a default zipccode? My site is a local site, so I doubt many people would change from the default

memobug
12-02-2004, 03:16 AM
Can you set a default zipccode?

You can pass a default zip code. You'd just need to put your default link in where the section is for users with no zip code in adv_portal_weather.

Replace this

<else />
<A HREF="$vboptions[bburl]/profile.php?do=editprofile">Add Zip Code</A> to show weather conditions.
</if>


with

<else />
<a href="http://www.weatherroom.com/forecast/90120.html"><img src="http://www.weatherroom.com/weather?forecast=zone&hwvtc=black&hwvbg=E1E4F2&pands=90120&config=png&alt=hwivzone&daysonly=1" alt="Weather for 90120 provided by weatherroom.com." border="0"></a><br/>
<A HREF="$vboptions[bburl]/profile.php?do=editprofile">Add Zip Code</A> to show Your own weather conditions.
</if>


and replace the 90210 (three times) with the zip you want to use.

The last link is still there in case someone doesn't like your default. You might not need the br/

Regards,

Matt

98EXL
12-02-2004, 10:07 AM
sweet, thanks dude

boo
12-03-2004, 12:39 PM
IMPORTANT! Change all instances of $bbuserinfo[field5] to whatever your field number is. If it is number 10 change it to $bbuserinfo[field10]. If you forget this step it will not work!


how do i know which field it is? i don't understand?

boo
12-03-2004, 12:49 PM
nvm ^^ i got know that...

but hw do you add

Stay in your Admincp - Styles & Templates - Style Manager - Add a new template called "adv_portal_weather".
Insert this code into the template:

where do i put it? where do i go

afterglow
12-03-2004, 01:00 PM
I installed this module perfectly but have to hide it later. It doesn't accept zip code from Japan. Is there an international version of this module? I see it only recognize US zip codes.

regards,
Afterglow

C_P
12-03-2004, 04:33 PM
I installed this module perfectly but have to hide it later. It doesn't accept zip code from Japan. Is there an international version of this module? I see it only recognize US zip codes.

regards,
Afterglow

From Post #5 (http://www.vbadvanced.com/forum/showpost.php?p=4982&postcount=5) in this thread....

this works for non US sites also.

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.

afterglow
12-05-2004, 10:15 PM
Thanks for the tip, however the link displays error pages.

Regards,
afterglow

memobug
12-06-2004, 02:39 AM
Are you sure? zip=RJTT

http://www.weatherroom.com/weather?forecast=zone&hwvtc=black&hwvbg=E1E4F2&pands=RJTT&config=png&alt=hwivzone&daysonly=1

zip=RJOB

http://www.weatherroom.com/weather?forecast=zone&hwvtc=black&hwvbg=E1E4F2&pands=RJOB&config=png&alt=hwivzone&daysonly=1

I think it works!

ryuuchida
12-06-2004, 09:31 AM
This works in Japan, alright; I have it on my board. The only problem I have is that some names are just too long and mess up the layout. In particular, the "New Tokyo International Airport" which is 3 lines, is really ugly and hides the date. I wonder why the dates don't automatically move down?

Bubbasmurf
12-07-2004, 02:47 PM
Thank you I was looking for somthing like this,
easy install.

Trevelyn1015
12-08-2004, 03:44 AM
i added my zip code and it still won't open up any kind of weather stuff...

http://www.ranger-forums.com/forum2/home.php

memobug
12-08-2004, 05:25 AM
Hi there Trevelyn1015. You need to make a test account on your forum if you want help. Anyone who isn't logged in isn't going to see any kind of weather stuff. Also check to make sure you are referencing the right user $bbuserinfo[field#] or you won't get any weather. View the source and see if you see your zip code in the link. If it's not there, it's wrong.

Regards,

Matt

memobug
12-08-2004, 05:43 AM
This works in Japan, alright; I have it on my board. The only problem I have is that some names are just too long and mess up the layout. In particular, the "New Tokyo International Airport" which is 3 lines, is really ugly and hides the date. I wonder why the dates don't automatically move down?

If you install hamweather3 on your server, you can play with the icaos.txt file and rename them if you like, or mess with the templates and use a different font or layout.

No one ever optimized that file. If you think Tokyo aiport is bad, try this one:

http://www.weatherroom.com/weather?forecast=zone&hwvtc=black&hwvbg=E1E4F2&pands=CYPH&config=png&alt=hwivzone&daysonly=1

inukjuak airport supplementary aviation weather reporting station, Canada

Trevelyn1015
12-08-2004, 09:28 AM
Hi there Trevelyn1015. You need to make a test account on your forum if you want help. Anyone who isn't logged in isn't going to see any kind of weather stuff. Also check to make sure you are referencing the right user $bbuserinfo[field#] or you won't get any weather. View the source and see if you see your zip code in the link. If it's not there, it's wrong.

Regards,

Matt

username: guest
password: password

Trevelyn1015
12-08-2004, 09:35 AM
nevermind, now... i got it working :)

Boofo
12-20-2004, 09:25 AM
I just changed servers and it doesn't seem to be working now for some reason. Is there something I need to do?

98EXL
12-20-2004, 12:03 PM
it's not working for me either........period anymore

jilly
12-21-2004, 12:51 AM
i'm thinking it's something to do with weatherroom?
maybe they have made it so we can't pull their info anymore? Maybe someone could check it with another weatehr site?

Delphivi
12-24-2004, 07:17 PM
hi,

i'm getting this error 'zone forecast is currently unavailible' i think it has something todo with the country i live in (Belgium)

never mind it's working :)

Bk-LS
12-26-2004, 06:38 AM
looks like its okay again.

hammertime33
12-31-2004, 03:54 AM
Installed NO PROBLEMS, well see what the members say tommorow, THANKS !

SVTOA
12-31-2004, 01:11 PM
It seems that weatherroom.com is working again, but just for the heck of it I have created two weather modules- one with WX and one with weatherroom. So when the page starts slowing down, I switch back to WX and just add three more "recent posts" to the other side of the page to balance out the module structure...

celluloi
01-01-2005, 09:15 PM
I too have seen the problems with weatherroom.com... their site won't even open up since yesterday...

hammertime33
01-01-2005, 10:43 PM
I installed yesterday and it worked great for 3 hours and then Pffft.

Weatherroom is still down. GOOD HACK though !!!

Maybe we suckin em dry? LOL

SVTOA
01-02-2005, 01:00 PM
probably... WX.com has worked perfectly so I'm just leaving it be...

funkie
01-04-2005, 09:55 PM
can the maps from this site be used http://www.met-office.gov.uk/index.html
if so how as it would benifit uk users

great hack btw

Delphivi
02-01-2005, 05:10 PM
what te **** is wrong with weatherroom.com then up then down then up again then shows dead images man pfffffff :mad: now it doesn't show up at all what kind of amateurs are running weatherroom.com ??????

excuse me for m language but i'm getting frusterated here

great hack through

wildondallas
02-04-2005, 02:52 PM
I haven't installed this hack, but have a weather feed coming from www.weather.com which is basically The Weather Channel's website. It is pretty basic, but serves the purpose for my site, plus I think the graphics look a little better, just my opinion :)

Alderwazeh
02-13-2005, 05:06 AM
SIMPLE WEATHER BLOCK

Instead of having to create members index fields and involving who is or who is not allowed to see ... I did a simple block like this ..
1. Go to the main page of this site and pick your country and city..at this url
http://www.weatherroom.com/cgi-bin/weather.cgi?config=&forecast=pass&pass=tafINT

2. Find your city code at the upper right of this page called ICAO Used
and in my case it was OEMK for MeKKah

3. Now you have displayed your city information at this url
http://www.weatherroom.com/cgi-bin/weather.cgi?config=&forecast=zandh&pands=OEMK

there is an option at the bottom of this page saying; adding weather to your site ..click on that and you will be prompted to this page
http://www.weatherroom.com/add.html

4. Put your city code as explained above and choose your backgound color for your block and the color of the fonts and hit contino ...

5. You will get an html code in a box ... copy this code and put it as such in your template..


<table align="center" border="0" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" class="tborder" width="100%">
<tr>
<td class="tcat"><span class="smallfont"><b>$vba_options[portal_blockbullet] Weather Conditions</b></span></td>
</tr>
<tr>
<td class="$getbgrow"><span class="smallfont">
<a href="http://www.weatherroom.com/forecast/$bbuserinfo[field5].html"><img src="http://www.weatherroom.com/weather?forecast=zone&hwvtc=black&hwvbg=E1E4F2&pands=$bbuserinfo[field5]&config=png&alt=hwivzone&daysonly=1" alt="Weather for $bbuserinfo[field5] provided by weatherroom.com." border="0"></a>

</span>
</td>
</tr>
</table>
<br/>

take out the codes in magenta color and place the new code...of course after you take out as well the variables and conditions for [field5]..

<a href="http://www.weatherroom.com/forecast/.html"><img src="http://www.weatherroom.com/cgi-bin/weather.cgi?forecast=hourly&hwvtc=&hwvbg=&pands=&config=png&alt=hwicc" alt="Weather for provided by weatherroom.com" border="0"></a><br><font size="1"> <a href="http://www.weatherroom.com/forecast/.html"> Conditions and Forecast</a></font>

6. Update your weather template...

This what I have done for everybody in my site.

Greebo
02-18-2005, 01:10 PM
Great module!

Do you know if the weather site can support more than one zip code at a time?

TLCAnna
02-18-2005, 04:09 PM
Is there a way to have it so the Zip Code isn't displayed on public profile? I'm so drained right now that I apologize if this is a no brainer and I should have known the answer to it..

ConqSoft
02-18-2005, 04:09 PM
You should be able to set that as a private field, I think.

TLCAnna
02-18-2005, 04:13 PM
Ugh! I have searched and feel like I am over looking it. Could you tell me where to go to make this private?

ConqSoft
02-18-2005, 04:13 PM
When you edit the custom profile field in your vBulletin AdminCP.

ConqSoft
02-18-2005, 04:14 PM
I have it set to private on my site, and it works fine. (Note, you, as an Admin, will still see it on their profile screen.)

TLCAnna
02-18-2005, 04:20 PM
Oh thank you thank you thank you!!!!!!!!

Got it fixed

last time
02-22-2005, 05:35 PM
I keep getting outdated forcasts from a month ago. Its a little different than whats posted, any clue why?

<table align="center" border="0" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" class="tborder" width="100%">
<thead>
<tr>
<td class="tcat smallfont" style="font-weight: bold;"><a style="float: $stylevar[right]" href="#" onclick="return toggle_collapse('forumhome_$mods[filename]')"><img id="collapseimg_forumhome_$mods[filename]" src="$stylevar[imgdir_button]/collapse_tcat$vbcollapse[collapseimg_forumhome_randomtopic].gif" width="15" height="15" border="0" alt="Collapse/Expand" /></a>$vba_options[portal_blockbullet] $mods[title]</td>
</tr>
</thead>
<tfoot style="display: none;"><tr><td></td></tr></tfoot>
<tbody id="collapseobj_forumhome_$mods[filename]">
<tr style="$vbcollapse[collapseobj_forumhome_randomtopic]">
<td class="$getbgrow">
<b>$vba_options[portal_blockbullet] Weather Conditions</b></span></td>
</tr>
<tr>
<td class="$getbgrow"><span class="smallfont">

<if condition="!$bbuserinfo['userid']">
<span class="smallfont">Registered members can see their local weather conditions here.<br /><br /><phrase 1="$vboptions[bburl]">$vbphrase[not_a_member_yet_register_now]</phrase></span>
<else />
<if condition="$bbuserinfo[field5] !=''">
<a target="_blank" href="http://www.weatherroom.com/forecast/$bbuserinfo[field5].html"><img src="http://www.weatherroom.com/weather?forecast=zone&hwvtc=black&hwvbg=E1E4F2&pands=$bbuserinfo[field5]&config=png&alt=hwivzone&daysonly=1" alt="Weather for $bbuserinfo[field5] 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>

</td>
</tr>
</tbody>
</table>
<br />