Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • Ninja Lead Moderator
    #904598

    Hi,

    It’s not easy to make a custom work on that, you can find the add to new icon from mod_jayahoo_weather module

    modules/mod_jayahoo_weather/helper.php with public static function getIcon($code) function
    modules/mod_jayahoo_weather/asset/weather-icons/
    /modules/mod_jayahoo_weather/mod_jayahoo_weather.php with $doc->addStyleSheet(JUri::base(true).’/modules/’.$module->module.’/asset/weather-icons/css/weather-icons.min.css’);

    Regards

    ssinha Friend
    #904665

    I would also like to know why suddenly the module is showing 10 days forecast instead of the original 5 days and how to go back to 5 days.

    Thanks.

    probombeiros Friend
    #904883

    OK,
    I will not venture to try to make this modification,

    is the suggestion to add these icons link that suggested above for the next update of the module, if possible with the image of baromether in pressure atmospheric

    Ninja Lead Moderator
    #905304

    I would also like to know why suddenly the module is showing 10 days forecast instead of the original 5 days and how to go back to 5 days.

    You can use my solution here to go back to 5 days from mod_jayahoo_weather module

    Open modules/mod_jayahoo_weather/tmpl/accodion.php file find and change

    <?php
    foreach($info->item->forecast as $forecast):
        $date = new JDate($forecast->date);
        $forecast->day = $date->format('D');
        $forecast->date = $date->format(JText::_('DATE_FORMAT_LC'));
    ?>

    to

    <?php
    $i = 0;
    foreach($info->item->forecast as $forecast):
        if ($i==5) {
          break;
        }
        $date = new JDate($forecast->date);
        $forecast->day = $date->format('D');
        $forecast->date = $date->format(JText::_('DATE_FORMAT_LC'));
        $i++;
    ?>
    probombeiros Friend
    #905489

    It worked, thanks

    how to add the icon of the barometer that suggested above, if there is some simple tips I thank you.


    1. cap-018
    ssinha Friend
    #905493

    Thank you Ninja Lead. Worked perfectly.

Viewing 6 posts - 1 through 6 (of 6 total)

This topic contains 6 replies, has 3 voices, and was last updated by  ssinha 8 years, 7 months ago.

The topic ‘icons changed in Module JA Yahoo Weather’ is closed to new replies.