1
jonpz
weather module for 2.2.x?
  • 2005/9/8 20:35

  • jonpz

  • Just popping in

  • Posts: 16

  • Since: 2005/5/10


anyone know? i tried vlweather (0.9 i think) with no luck.

2
jlm69
Re: weather module for 2.2.x?
  • 2005/9/8 21:49

  • jlm69

  • Module Developer

  • Posts: 719

  • Since: 2002/7/19


I just tried vlweather version .9 and it seems to work for me, with XOOPS 2.2.3. There is a problem with the index.php page but the vlindex.php works fine.
Go to about line number 14 & 15 of the index.php file and look for this:

function disp_complete_vlweather() {
global $xoopsDB, $xoopsUser;

Change those two lines to:

function disp_complete_vlweather() {
global $xoopsDB, $xoopsUser, $xoopsConfig;

include_once(VLWEATHER_BASE_DIR . '/cache/config.php');
$icao = $vlweatherset['icao'];
$vl_country = $vlweatherset['country'];
$vl_format = $vlweatherset['pref_units'];
$vl_offset = $vlweatherset['timeoffset'];

Then everything seems o.k.

Hope that helps,

John

3
gestroud
Re: weather module for 2.2.x?
  • 2005/9/8 21:54

  • gestroud

  • Home away from home

  • Posts: 1538

  • Since: 2004/12/22


I've got MS-Weather 1.4 running on two 2.2 with no problems. One's for Canada, one is U.S. Both work great.

4
TottoBG
Re: weather module for 2.2.x?
  • 2005/9/13 8:22

  • TottoBG

  • Not too shy to talk

  • Posts: 111

  • Since: 2005/8/18


gestroud, look at that thread -https://xoops.org/modules/newbb/viewtopic.php?topic_id=23991&start=0#forumpost181587
the guys are right, there's a copyright violation there using ms-weather. in fact, the module author seems to be responsible here, while giving it on GPL, but we all seem to be careful too.
Greeting!

5
jfmoore
Re: weather module for 2.2.x?
  • 2006/7/16 5:24

  • jfmoore

  • Quite a regular

  • Posts: 360

  • Since: 2004/6/6 5


John,

MS_Weather has stopped working on my 2.2.4 site, so I tried VL-Weather with your mod, and it works. Thanks! I need to add a city, though, and it appears that the only way to do this is to modify the sql file, upload, and update the module. That's okay, but I need to know where to get the city info to put in the file.

The sql line for Atlanta is:
('KATL', 'Atlanta, Hartsfield Atlanta International Airport', 'US', 'United States', 'Atlanta', 'GAZ033'),

So, I need to know where to find the info for other cities which would correspond to the 'KATL' and 'GAZ033' in the above line. Can't seem to find it on the NOAA site. Any ideas?

Jere
...

6
jlm69
Re: weather module for 2.2.x?
  • 2006/7/16 13:56

  • jlm69

  • Module Developer

  • Posts: 719

  • Since: 2002/7/19


Jere,

What cities do you want to add? I will try to see what I can find, it has been a while since I did anything with that module though.

Thanks,
John

7
jfmoore
Re: weather module for 2.2.x?
  • 2006/7/16 15:08

  • jfmoore

  • Quite a regular

  • Posts: 360

  • Since: 2004/6/6 5


Quote:

jlm69 wrote:
Jere,

What cities do you want to add? I will try to see what I can find, it has been a while since I did anything with that module though.

Thanks,
John


John,

OK, I found the info and got it working. Here are the steps:

1. Go to this page http://weather.noaa.gov/pub/data/products/zones.txt and find the zone within the state. In my case it was Barnesville, GA, and the zone is 70. Therefore, the zone info to go in the sql file is GAZ070.

2. Go to this page http://www.nws.noaa.gov/tg/siteloc.shtml and find the meteorological station closest to the city in which you are interested. In my case, it is as follows:

Thomaston, Thomaston-Upson County Airport (-----, KOPN)

(This station is the closest to Barnesville--only 8 miles away)

The 2 things we need here are:
KOPN
Thomaston, Thomaston-Upson County Airport

3. The 4th thing we need is what we want to call this entry. For me, that is:

Barnesville

4. We build the sql statement as follows:

('[Station ID]', '[Location of meteoroligical station]', '[Country abbreviation]', '[Country]', '[What you want to call it]', '[Zone]'),

like--

('KOPN', 'Thomaston, Thomaston-Upson County Airport', 'US', 'United States', 'Barnesville', 'GAZ070'),

5. Insert this line into the vlweather sql file in alpha order by meteorological station name in the section for your country (although where you put it may not matter; I don't know) like:

('KTXK', 'Texarkana, Texarkana Regional-Webb Field', 'US', 'United States', 'Texarkana', 'ARZ070'),
('KDLS', 'The Dalles, The Dalles Municipal Airport', 'US', 'United States', 'The Dalles', 'ORZ010'),
('KTVF', 'Thief River Automatic Weather Observing / Reporting System', 'US', 'United States', 'Thief River Falls', 'MNZ013'),
('KOPN', 'Thomaston, Thomaston-Upson County Airport', 'US', 'United States', 'Barnesville', 'GAZ070'),
('K3TH', 'Thompson Falls', 'US', 'United States', 'Thompson Falls', 'MTZ004'),
('PATC', 'Tin City Airways Facilities Sector', 'US', 'United States', 'Tin City', ''),
('KTIK', 'Tinker Air Force Base', 'US', 'United States', 'Oklahoma CityMidwest City', 'OKZ025'),

6. Save the sql file, upload it, deactivate the weather module, uninstall it, and re-install it. I'm sure there is an easier way to do this step, and I'll let someone who knows better than I tell us how.

7. When you add the weather block, put in the default station ID. In my case,that is KOPN.

8. Cross your fingers, take a look, and hope it works.

Jere
...

8
jfmoore
Re: weather module for 2.2.x?
  • 2006/7/28 20:07

  • jfmoore

  • Quite a regular

  • Posts: 360

  • Since: 2004/6/6 5


Quote:

jlm69 wrote:
I just tried vlweather version .9 and it seems to work for me, with XOOPS 2.2.3. There is a problem with the index.php page but the vlindex.php works fine.
Go to about line number 14 & 15 of the index.php file and look for this:

function disp_complete_vlweather() {
global $xoopsDB, $xoopsUser;

Change those two lines to:

function disp_complete_vlweather() {
global $xoopsDB, $xoopsUser, $xoopsConfig;

include_once(VLWEATHER_BASE_DIR . '/cache/config.php');
$icao = $vlweatherset['icao'];
$vl_country = $vlweatherset['country'];
$vl_format = $vlweatherset['pref_units'];
$vl_offset = $vlweatherset['timeoffset'];

Then everything seems o.k.

Hope that helps,

John


OK, got everything working with only 1 (that I know of) problem: The time zone seems to be off about 5 hours, which, coincidentally, is my GMT offset. I am in the eastern time zone, or GMT-5.

The weather block doesn't actually give the time, so I don't know what time it thinks it is, but the little icons which show day and night scenes are messed up. I can't say exactly, but it seems to shift to night scenes about 2:00 in the afternoon and back to day scenes about 2:00 in the morning.

Did, perhaps, the hack change something which would cause this, or could it be a XOOPS 2.2 thing, or what? Any ideas how to fix it?

Jere
...

9
jlm69
Re: weather module for 2.2.x?
  • 2006/7/28 21:45

  • jlm69

  • Module Developer

  • Posts: 719

  • Since: 2002/7/19


Jere,

Did you look in the file vlweather/cache/config.php at the bottom, look for this line:

$vlweatherset['timeoffset'] = -5.0;

Is it the same -5.0

other than that I'm not sure.

Let me know how you make out, maybe I can find something else,

John

10
jfmoore
Re: weather module for 2.2.x?
  • 2006/7/28 22:55

  • jfmoore

  • Quite a regular

  • Posts: 360

  • Since: 2004/6/6 5


Quote:

jlm69 wrote:
Jere,

Did you look in the file vlweather/cache/config.php at the bottom, look for this line:

$vlweatherset['timeoffset'] = -5.0;

Is it the same -5.0

other than that I'm not sure.

Let me know how you make out, maybe I can find something else,

John


Hi John,

Thanks. That should fix it. It was set to -8.0, and I changed it to -5.0. Tried to fake me out, though. I kept making changes, but the icon didn't change. Had to clear the browser cache.

Jere
...

Login

Who's Online

245 user(s) are online (158 user(s) are browsing Support Forums)


Members: 0


Guests: 245


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: May 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits