We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 38878
    • 255 Posts
    Since this addon was recently published by Goldsky, I thought I'd provide some feedback on it for those looking at using it.

    First, let me say well done. Worked out of the box. I did do some styling with css and ran into some issues with the way the chunks render. I needed to modify the class file to allow me to show/hide the forecast information by adding two lines to create a div tag around the forecast elements. This is important if you want to deal with the forecast content as a block like toggling and not as individual elements which are rendered separately by a row tpl.

    In the core/components/localweather/model/localweather/localweather.class.php file, @ around line 180 directly before the line
    		foreach($forecast as $key => $weather)
    add the following:
    $parsed = '<div id="forecast-content">';
    

    Also @ line 208 and directly before the line
    return $parsed;
    add the following:
    $parsed .= '</div>';

    This is pretty minor but will allow you to reference the div by ID so you can toggle the forecast information or whatever. It would be great to include this in any updates to make dealing with the layout easier.

    Secondly, I really want to modify the location that is displayed. Currently regardless of what I enter as a location parameter, I get "City, United States of America" in the output which is kinda fail. I would prefer "City, State". It would be awesome to be able to define a different parameter for the location output label in the snippet as an option.

    Lastly, it would be awesome to use an image sprite for the icons to help it load faster (I think the icon urls are coming back in the JSON data but I'm not 100%). I do know they are individual images and there are plenty of "spritey" options out there for no duckets.

    Again I think this is a awesome addon and thanks to Goldsky for doing it. I have a working version running with my quick modifications in my cloud with a bare bones flexibility template at http://c0069.paas2.tx.modxcloud.com/.

    Enjoy.