Shape 5

Joomla Templates => City Portal - January - Club => : sakari January 16, 2009, 04:56:03 AM



: mod s5 weather for J1.5
: sakari January 16, 2009, 04:56:03 AM
Hello friends and to the team of Shape5,  ;)

I'm new here and have a question!

This weather module is very good, but can you change the language in German?

Thank you!

Maria


: Re: mod s5 weather for J1.5
: jay973 January 16, 2009, 12:54:58 PM
Also, is it possible to use this in the UK? I've tried entering my own and some other Post Codes and it doesn't seem to work with them.


: Re: mod s5 weather for J1.5
: jonahh January 16, 2009, 01:19:27 PM
Unfortunately there really isn't a way to change the language without editing the "weather.class.php" file included with this module.

Look for:

"http://xml.weather.yahoo.com"

You'd have to replace this with the correct XML news feed for the corresponding country.  We are not sure what the XML address is for other countries.

Regards,


: Re: mod s5 weather for J1.5
: jay973 January 16, 2009, 01:47:42 PM
I've got it working now. I didn't need to alter the files (Except for a couple of spelling errors 'preasure' and 'celcius'). All I did was enter my 'Location ID' into the Zip code box and so far, so good.
More details on Location ID at http://developer.yahoo.com/weather/


: Re: mod s5 weather for J1.5
: phoenixx January 16, 2009, 10:02:38 PM
@jay973: May I ask what exactly was your "Location ID" please? I had a read on that link, and it looks like if your zip has only 4 digits( I'm an Aussie, so mine does), you have to put XX5431 as the zip. I assume( bad move, I know) that Australia's "ID" is AU (?)
Would love to get this great module working, any help would be greatly appreciated.
LOVE this template ;D
Thanks


: Re: mod s5 weather for J1.5
: jay973 January 16, 2009, 10:05:24 PM
I'm in York so my Location ID is UKXX0162

Hope this helps,

Jason.


: Re: mod s5 weather for J1.5
: phoenixx January 16, 2009, 10:33:38 PM
Yeah, that's what I thought. I tried AUXX5000 ( which is actually Adelaide, because I doubt my tiny town would show on Yahoo weather)...but all I get is whatever zip was default in the module...and I can't find WHERE it is. I've looked in every php file of the module for it. :(


: Re: mod s5 weather for J1.5
: fuslm January 17, 2009, 03:52:29 PM
Hi

I went to http://weather.yahoo.com/

I entered my location or postcode where it says Enter city or zip code:

The location id is then at the end of the url for the page that then displays.

Entering the location id in the module admin where it asks for zipcode then worked and the module displayed correctly.

Cheers

Martin


: Re: mod s5 weather for J1.5
: fuslm January 17, 2009, 03:57:09 PM
The only annoying thing is that the location displays as

Loughborough, , UK

with 2 commas.

Does anybody know how to amend this?

Thanks

Martin


: Re: mod s5 weather for J1.5
: sakari January 18, 2009, 12:02:34 PM
Hi friends,
Thank you for the many answers!

Unfortunately there really isn't a way to change the language without editing the "weather.class.php" file included with this module.

According jonahh should "weather.class.php" processed,
unfortunately I can not even!

Can someone from you?  (for the German language!)

I Thank you in advance!

Love Regards  :)
Maria



: Re: mod s5 weather for J1.5
: jonahh January 19, 2009, 11:00:47 AM
Yeah, that's what I thought. I tried AUXX5000 ( which is actually Adelaide, because I doubt my tiny town would show on Yahoo weather)...but all I get is whatever zip was default in the module...and I can't find WHERE it is. I've looked in every php file of the module for it. :(


The zip is not included in any of the files, if you use the site shaper it will be included in this and is stored in your mysql database.  But you should be able to delete it and then resave.  If not try uninstalling the module and reinstalling as the module files themselves do not include the zip.


: Re: mod s5 weather for J1.5
: fuslm January 19, 2009, 12:18:41 PM
Hi jonahh

Any ideas with the formatting issue.  The title shows as

Loughborough, , UK

with 2 commas in it.

Any way to change it or is this just what's displaying from the feed?

Thanks

Martin


: Re: mod s5 weather for J1.5
: phoenixx January 20, 2009, 02:04:45 AM
Hi

I went to http://weather.yahoo.com/

I entered my location or postcode where it says Enter city or zip code:

The location id is then at the end of the url for the page that then displays.

Entering the location id in the module admin where it asks for zipcode then worked and the module displayed correctly.

Cheers

Martin

Thanks for that Martin! Had partial success....Shows weather for Yongala, which is a fair way from my place ( no biggie though), but it has "AS" ( which I think is the Yahoo weather code for Australia) after the town name. If it was "SA" instead it would at least have the State right LOL ( It would be nice if us Aussies could be a bit better "represented" by Yahoo and Google ;) ) There's a thought! I'll go look and see if Yahoo.au has the same weather thingy

Thank  you too,  Jonahh, I'll certainly make a note of that for future reference :)


Edited to add:
Well, I did find the Aussie Yahoo weather thingy. It did a slightly better job, though I had to use Adelaide as the City( which is over 300km South of me lol). Interestingly, it gave me the same problem you had Martin: it shows as " Adelaide,,AS". Am going to see if maybe that "pre-text" part of the module will let me add some clarification text.


: Re: mod s5 weather for J1.5
: queslett January 20, 2009, 06:31:24 AM
well mine just gives the title weather and white space......... smiles


: Re: mod s5 weather for J1.5
: dangel January 25, 2009, 06:03:23 PM
well mine just gives the title weather and white space......... smiles
Mine does the same thing - title, but no weather information displayed.  I've got the yahoo ID entered in per the above directions, but nothing displayed....


: QUICK FIX - Re: mod s5 weather for J1.5
: silhouette January 31, 2009, 07:03:38 PM
OK, for the 95% of the world population who don't live in the USA *wink* this will work (or at least it does for me). Warning: Save all files you are about to edit to a back-up file

1. Drill down to your location on Yahoo Maps http://weather.yahoo.com/
2. Look at the address bar (I live in Melbourne, Australia so it looked like this: http://ther.yahoo.com/Melbourne-Australia/ASXX0075/forecast.html?unit=c)
3. Copy the region/area code (for me it was: ASXX0075)
4. Now open up the weather.class.php file (../modules/mod_s5_weather) and search for the the word: 'location' (there are two instances) and replace with the code that you have just copied from Yahoo, save and close.
5. Open up mod_s5_weather.php file and look for the line: echo "<strong>".$ret[0]['location']."</strong>

";

replace with this: echo "<strong>".'My City Weather'."</strong>

";
or whatever title you want. Save and close. (The reason for this edit is if you enable the title in the Module Admin it leave a big space after it before the actual weather function starts, so use this and don't enable the title in the Admin area and this will look better...or do it your own way!)
6. In the Admin area of the weather module simply paste the Yahoo region code into the zip code box (eg mine is: ASXX0075)
7. Enable the module as per normal in the Admin area

That's it!

While you have the files open you might as well fix the spelling mistakes:
1. mod_S5_weather.xml - change Celcius to Celsius (one instance)
2. mod_S5_weather.php - change preasure to pressure (two instances)
3. weather.class.php - change preasure to pressure (one instance)

And thanks to Shape5, nice Template.

David


: Re: mod s5 weather for J1.5
: fuslm February 01, 2009, 03:09:48 PM
Many thanks for this David - absolutely spot on. Cheers Martin. ;D


: Re: mod s5 weather for J1.5
: phoenixx February 01, 2009, 08:33:37 PM
Many thanks indeed David! Worked perfectly!!


: Success!!! Re: mod s5 weather for J1.5
: sirfan July 25, 2009, 05:50:31 PM
Hi Gals and Guys,
I have found a trick to make this great mod work with Doha, Qatar where there absolutely no zip codes what so ever!

Here is what you should do too: Visit http://weather.yahoo.com/forecast and find your city and state or country first, then find the orange colored RSS feed subscription icon on this result page and click on it. Once you arrive on feed page, look into the URL field up in the browser, it may look similar to mine, "http://weather.yahooapis.com/forecastrss?p=QAXX0003&u=f".
Copy only the value between the equal to symbols(QAXX0003&u) and place it in the mod where the zipcode goes.

That's it, it should work now!

Cheers,
S. Irfan


: Re: mod s5 weather for J1.5
: jmayor August 07, 2009, 06:07:10 PM
Hi David:

I have configured the weather module following your instructions but it still doesnt work.

I have updated to Joomla 1.5.14 and I don't know if this is the reason. The domain where I installed the template is www.consultoriaturistica.com. The wheather module is on the right position (El Tiempo)

Could you help me, please, to make it work correctly?

Regards from Spain

Jorge


: Re: mod s5 weather for J1.5
: jonahh August 10, 2009, 12:04:58 PM
No the update is not the reason, it does not touch the module's files.  I went to your site but its just a blue screen with only a few links, I dont see a joomla site.


: Re: mod s5 weather for J1.5
: barnesc July 15, 2011, 02:09:33 AM
For Australian Users, lookup ZIP code from this site

http://beta.weather.com/weather/today/ASXX0112

There are two problems with the template:

1. You get an extra two commas

2. Australia is represented as AS by the weather providers!


: Re: mod s5 weather for J1.5
: emajluap July 19, 2012, 07:57:15 PM
This doesn't work at all. Mactan, philippines is my area. Any solutions?