Welcome to Geeklog Sunday, October 24 2021 @ 02:49 pm EDT

Geeklog Forums

NEW Weather Block Released


Status: offline

squatty

Forum User
Full Member
Registered: 21/01/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.

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. The block is availbe for download here.

    Enjoy,

    Danny -- danny@squatty.com


    In a world without walls and fences, who needs Windows and Gates?
     Quote

    Anonymous

    Anonymous
    You the man squatty Smile --Mr.GxBlock
     Quote

    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.
     Quote

    Anonymous

    Anonymous
    I am having a similar problem. I fixed that paths for the inclusions, but then I just get a blank page.
     Quote

    Status: offline

    chmouel

    Forum User
    Newbie
    Registered: 05/02/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.
     Quote

    Status: offline

    chmouel

    Forum User
    Newbie
    Registered: 05/02/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.
     Quote

    Anonymous

    Anonymous
    Thanks, chmouel! That got it working for me.
     Quote

    Status: offline

    Kybla

    Forum User
    Newbie
    Registered: 15/05/02
    Posts: 9
    Great block! But when I switch to Celsius, I got "No data".
     Quote

    Status: offline

    squatty

    Forum User
    Full Member
    Registered: 21/01/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?
     Quote

    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
     Quote

    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.
     Quote

    All times are EDT. The time is now 02:49 pm.

    • Normal Topic
    • Sticky Topic
    • Locked Topic
    • New Post
    • Sticky Topic W/ New Post
    • Locked Topic W/ New Post
    •  View Anonymous Posts
    •  Able to post
    •  Filtered HTML Allowed
    •  Censored Content