Welcome to Geeklog Sunday, May 26 2013 @ 02:14 AM EDT
|
||||||||
![]() |
Forum Index > Extensions > PHP Blocks |
New Topic
|
Post Reply
|
NEW Weather Block Released |
|||
| squatty |
|
||||||
![]() ![]() ![]() ![]() ![]() Full Member ![]() Status: offline ![]() Registered: 01/21/02 Posts: 269 |
The new block makes use of the Open Source phpweather project as its foundation. All weather feeds or METARs are provided by the NOAA organization.
In a world without walls and fences, who needs Windows and Gates? |
||||||
|
|||||||
| Anonymous: Anonymous |
|
||||||
|
|
You the man squatty
|
||||||
|
|||||||
| 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. |
||||||
|
|||||||
| Anonymous: Anonymous |
|
||||||
|
|
I am having a similar problem. I fixed that paths for the inclusions, but then I just get a blank page.
|
||||||
|
|||||||
| chmouel |
|
||||||
![]() ![]() ![]() ![]() ![]() Newbie Status: offline ![]() Registered: 02/05/02 Posts: 13 |
You got to fix also the require('config.inc') to include_once('path/to/geeklog/weather/config.inc') in phpweather.inc also.
|
||||||
|
|||||||
| chmouel |
|
||||||
![]() ![]() ![]() ![]() ![]() Newbie Status: offline ![]() Registered: 02/05/02 Posts: 13 |
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. |
||||||
|
|||||||
| Anonymous: Anonymous |
|
||||||
|
|
Thanks, chmouel! That got it working for me.
|
||||||
|
|||||||
| Kybla |
|
||||||
![]() ![]() ![]() ![]() ![]() Newbie ![]() Status: offline ![]() Registered: 05/15/02 Posts: 9 |
Great block! But when I switch to Celsius, I got "No data".
|
||||||
|
|||||||
| squatty |
|
||||||
![]() ![]() ![]() ![]() ![]() Full Member ![]() Status: offline ![]() Registered: 01/21/02 Posts: 269 |
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. In a world without walls and fences, who needs Windows and Gates? |
||||||
|
|||||||
| 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 |
||||||
|
|||||||
| 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. |
||||||
|
|||||||
| Content generated in: 1.21 seconds |
|
|
|