Posted on: 08/13/02 06:02am
By: squatty
The new block makes use of the Open Source
phpweather project[*1] as its foundation. All weather feeds or
METARs[*2] are provided by the
NOAA organization[*3] .
The new block has all the same functionality as the orginal block with the exception of the 5 day forecast. The 5 day forecast has been replaced with a more detailed view of the current weather conditions for a given location. New features include the follwing:
Block view displays a brief description for the most common weather phenomena.
Supports proxy servers via a config file.
Supports a hiearcy of locations (METARs) by region or country.
Improved block and detailed view navigation.
Added a cache flush feature to update cached content.
Attempts to make use of language files...needs more work.
As always, you can view the new block in action at here[*4] . The block is availbe for download here[*5] .
Enjoy,
Danny -- danny@squatty.com
NEW Weather Block Released
Posted on: 08/13/02 01:27pm
By: Anonymous (Anonymous)
You the man squatty

--Mr.GxBlock
NEW Weather Block Released
Posted on: 08/13/02 11:03pm
By: Anonymous (Anonymous)
Hi Danny, I need some help here. I am getting error installing the block:
Warning: Failed opening 'phpweather.inc' for inclusion (include_path='') in /home/roughlif/public_html/portal1/public_html/weather/display_weather.php on line 6
Warning: Failed opening 'locale_en.inc' for inclusion (include_path='') in /home/roughlif/public_html/portal1/public_html/weather/display_weather.php on line 7
Fatal error: Call to undefined function: get_metar() in /home/roughlif/public_html/portal1/public_html/weather/display_weather.php on line 11
THis is a new installation. I think I followed all the steps. The only thing I didnot do is Step 2 running the sql script, not exactly sure what it means.
Thanks.
NEW Weather Block Released
Posted on: 08/14/02 07:52am
By: Anonymous (Anonymous)
I am having a similar problem. I fixed that paths for the inclusions, but then I just get a blank page.
NEW Weather Block Released
Posted on: 08/15/02 01:31am
By: chmouel
You got to fix also the require('config.inc') to include_once('path/to/geeklog/weather/config.inc') in phpweather.inc also.
NEW Weather Block Released
Posted on: 08/15/02 01:58am
By: chmouel
Humm look great, but the weather_details.php doent work when requesting the cache from phpweather.inc dunno why but why don't you convert everything to the DB_* from geeklog when doing the query (its the query in php who fail since native query does work)....
Cheers.
NEW Weather Block Released
Posted on: 08/15/02 06:25am
By: Anonymous (Anonymous)
Thanks, chmouel! That got it working for me.
NEW Weather Block Released
Posted on: 08/16/02 06:28am
By: Kybla
Great block! But when I switch to Celsius, I got "No data".
Small Update
Posted on: 08/19/02 05:17am
By: squatty
It seems I made an error in judgment regarding the detailed view. The current configuration ONLY looks to the DB. This however presents a problem if a particular city has not been accessed via the front block view or if the front page view content is stale (old). In both cases, the detailed view does not work correctly.
To fix the problem update the details.inc file as follows:
Change the following (around line 288):
Change:
--- CODE BEGINS ---
function get_metardata($station, $always_use_cache = 1)
--- CODE ENDS ---
To:
--- CODE BEGINS ---
function get_metardata($station, $always_use_cache = 0)
--- CODE ENDS ---
This fix will make the detailed view look at the timestamp of the METAR in the DB and fetch and updated feed (and cache it) should the timestamp be too old.
NEW Weather Block Released
Posted on: 08/28/02 02:58am
By: Anonymous (Anonymous)
Nice look to the nodule:-))
I had similiar problems discussed in this thread , however they were rectified by applying the advice given here (thank you).
One problem remains, when I click more details I get the error message:
"Warning: Access denied for user: 'username@localhost' (Using password: NO) in /path/to/geeklog/public_html/weather/phpweather.inc on line 19"
"Unable to connect to MySQL database!"
The weather details DO appear below the message.
I've checked the config.inc and all is well with db info there.
Any suggestions will be appreciated.
Regards
GG
NEW Weather Block Released
Posted on: 09/01/02 08:22am
By: Anonymous (Anonymous)
phpweather.inc
line 16
/* Load the default configuration: */
require('/path/to/geeklog/weather/config.inc');
This resolved the problem. I tried it in my early attempts to sort this problem out, however a cached page must have mislead me.