It would be great if each of the elements of the feed were selectable in the module config, maybe a checkbox for each one. For example you could drop dewpoint and add sunrise... I like the mini block in 4.40 (too bad it's not backward compatible with 4.30; I'll have to figure out how to upgrade Drupal... :o)

CommentFileSizeAuthor
#1 weather_1.module28.82 KBgerardryan

Comments

gerardryan’s picture

StatusFileSize
new28.82 KB

see attached for a backwards compatible version (pre 4.4).

roobul’s picture

Thanks for the backward-compatible version. I just added sunrise/set and moon into the block on the original 4.30 (good for a fishing/boating community), so I'll put them in here too. In 4.30, the "powered by" link is broken (the one in the block is good). Looks like this->poweredby gets set in init_weather() but the extended forecast runs init_forecast() instead. I haven't tracked it down yet, but it's getting blurry ;) Have you found this before?

roobul’s picture

Category: feature » bug

In the newer version, the following function changed

function weather_xml_icon($url) {
  global $base_url;
  $this_site = preg_replace("/http:\/\//", "", $base_url);
  $url = variable_get("clean_url", 0) ? $url : '?q=$url';
  return "<p><div align=\"center\" class=\"xml-icon\"><a href=\"$url\"><img src=\"misc/xml.gif\" width=\"36\" height=\"14\" alt=\"XML feed provided by weatherroom.com and locally hosted by " . $this_site ."\" /></a></div>";
}

with the add of the call to variable_get(). I don't know what that's supposed to do, but this function coming back with "$url" instead of "weather/feed", so the XML icon fails.

gerardryan’s picture

Assigned: Unassigned » gerardryan

I believe this issue has been resolved. Closed for now, please re-submit if you run into anymore problems.