I think there should be a separate option (checkbox) for the weather icon and the current conditions in case some people want only the weather icon shown (in order to have a minimal weather block).

Currently if you want to disable all text fields below the weather icon, you can only do this for the rest of the display options, since disabling the 'Show current' checkbox disables the icon as well. There should be a 'Show icon' option.

Comments

mckramer’s picture

I agree with this request and I have been editing the module for my own use with a lot of new features.

$show_options = array(
    'build_time' => t('Show the time that the weather was last updated'),
    'current' => t('Show current weather text'),
	'current_image' => t('Show image of current weather'),
    'temperature' => t('Show current temperature'),
    'wind' => t('Show current wind speed and direction'),
    'feels_like' => t('Show current "feels like" condition'),
    'humidity' => t('Show current humidity level'),
    'visibility' => t('Show current visibility'),
    'pressure' => t('Show current atmospheric pressure'),
    'sunrise_sunset' => t('Show sunrise/sunset for current day'),
    'forecast' => t('Show forecast of current and next day'),
    'forecast_description' => t('Show forecast description'),
	'forecast_image' => t('Show images for forecast'),
	'custom_images' => t('Use custom images. Caution: custom images must be included by you!  Place custom images in "images/custom" directory of module.  Make sure to follow naming conventions of included images.'),
  );
klonos’s picture

Great news Max! Let us know if we can help with testing.

It's been some time now since I've last heard from Pedro regarding some of the issues I was bothered with. So, I'm guessing real life is keeping him busy. It's really nice to see that someone is working on improvements.

Thanx in advance for your time spent on this ;)

mckramer’s picture

Status: Active » Needs review
StatusFileSize
new2.51 KB
new20.2 KB

Well, if you'd like to take it for a spin, here are the two files I edited. The module and the template.

Also included is a fixed typo, I changed the mention of zipcode to WOEID, the database error I was getting is handled, and there is a little syntax change to the template.

One thing I am unsure of is "visibility". I keep getting the empty string as the value. I am unsure if that means the visibility is clear (i.e. to the horizon) or if it is just a lack of data. Right now, I am handling it to just hide the visibility if it the empty string. Weather.com lists visibility as 10mi (for the same location and time as yahoo api), which is probably the maximum, so I could change it to display "10mi" or "clear" if it is empty. Just let me know what makes the most sense.