Shape 5

Joomla Templates => City Portal - January - Club => : jimmer January 20, 2009, 04:10:14 PM



: setting up weather module.
: jimmer January 20, 2009, 04:10:14 PM
I need to set up this weather module for my site.

Location: Sauble Beach, Ontario.  Canada...

Need some help.

thanks,

Jim


: Re: setting up weather module.
: jonahh January 20, 2009, 09:59:58 PM
Have you tried inputting your zip in the admin side?


: Re: setting up weather module.
: queslett January 21, 2009, 03:32:38 AM
i have tried doing that and following the instructions but still blank!!!


: Re: setting up weather module.
: jimmer January 21, 2009, 09:39:08 AM
See development site

http://sportbikejunkies.net/APOA

I have put in the postal code as in Canada no Zip...

Thanks,

James


: Re: setting up weather module.
: kstieb January 21, 2009, 09:21:43 PM
I have also tried with Canadian postal code.  Gives the same weather report as the demo site, no matter what postal code I use for places across Canada.


: Re: setting up weather module.
: kstieb January 21, 2009, 09:27:14 PM
I found the answer.... Look at the following post.

http://www.shape5.com/component/option,com_smf/Itemid,75/topic,3599.0/

Once I entered the correct code, everything worked fine.  Great module!


: Re: setting up weather module.
: akiva February 03, 2009, 08:03:33 PM
1. Go to http://weather.yahoo.com/ and enter your location.
2. Grab the location ID from the search results URL: http://weather.yahoo.com/forecast/CAXX0343.html --> CAXX0343
3. In Extensions > Module Manager >S5 Weather Module > Module Parameters > Zip Code Field insert the Location ID.

For a quick fix. Zip Code is numeric format. Location ID contains letters. To prevent the module from displaying "City, , CA" when the Location ID is inserted into the Zip Code field, replace the following in the class file (  modules / mod_s5_weather / weather.class.php ):

Find:

   $ret[0]['location'] = $attr[1].', '.$attr[3].', '.$attr[5];

Replace with:

   if(is_numeric($zip)) $ret[0]['location'] = $attr[1].', '.$attr[3].', '.$attr[5];
   else $ret[0]['location'] = $attr[1].', '.$attr[5];

I have a better solution which I will post, but it is much more involved, but this works for a good quick fix.


: Re: setting up weather module.
: seether13 February 23, 2009, 11:41:43 AM
Thanks Akiva, was very helpful


: Re: setting up weather module.
: karl0409 February 23, 2009, 01:13:31 PM
Hello,
go to weather.yahoo.com
There enter in the search field your location - which is north-america. Find your city and let yahoo show you the
weather. Then copy the code from the address-field, which is something like / CAXX0 ... into your weather module.