Page 1 of 1

Yahoo Weather Plug-In

Posted: Thu May 10, 2007 8:38 pm
by doomsayer
I tried to create a Yahoo Weather plug-in.
You can see it at http://www.wesandkim.com/blog
The code is at http://www.wesandkim.com/blog/serendipi ... eather.zip
It allows you to put in up to 15 different locations you'd like to see the weather for. The configuration allow you to switch between Celsius and Fahrenheit.
Because of the way I parsed the RSS feed from Yahoo it requires php5.

This is my first plug-in so be gentle.
:D


I noticed Iamyposted about creating one also, however I don't see the code for it anywhere.

Posted: Thu May 10, 2007 8:49 pm
by judebert
Nice job! I haven't checked the source, but the implementation is working nicely. Congratulations; I look forward to seeing the rest of your efforts.

Posted: Fri Jun 29, 2007 10:26 am
by xqTpx
I'm loving your plugin, its working just after the installation. No requierd perl or anything else :). I'm not quite sure how i can costumise that plugin to display the weather condition in german .....
but that shouldt be a problem.

btw: lol ^^
@define('PLUGIN_YWEATHER_DEFAULTZIP_BLAHBLAH',

Yahoo weather Plugin

Posted: Sat Jun 30, 2007 1:51 am
by doomsayer
I am glad you like it. I would love to get it to work in German. If you can help me find a German rss feed for it. http://de.weather.yahoo.com/ would be the place to start looking I think.

You can have it work for anywhere in the world by figuring out the location code for anyplace and of course switching from degrees in F to C.

Yahoo Pipes to translate

Posted: Wed Sep 05, 2007 11:16 pm
by doomsayer
Yahoo Pipes can translate a RSS feed into German using Bablefish. Since I don't speak enough German to do more than order a beer I have no idea if it translates well enough.

If it does it may be a good solution.

http://pipes.yahoo.com/pipes/pipe.info? ... jalkl7okhQ

Posted: Mon May 12, 2008 2:00 am
by sonichouse
This works fine for me.

I had to comment out the cookie on line 313

Code: Select all

    // Set the cookie for the browser's session's life.
//    setcookie('yweather',$weather); 
as Cherokee was moaning about the headers already being sent.

Perhaps we can have the cookie as a config option ?

Thank you for taking the time to contribute this.

Posted: Mon May 12, 2008 3:53 pm
by sonichouse
There was a missing /select at the end which caused Safari to barf.

So i changed it to do

Code: Select all

echo "</select><br /><input type =\"submit\" value =\"Submit\" /></form>";
Cheers.

Version 1.1 enhancements/bugfixes

Posted: Tue Oct 28, 2008 9:38 pm
by doomsayer
Version 1.1 enhancements/bugfixes
  • Replaced the Submit button with javascript to submit the page.
    Should no longer have the "drop down list has a blank line at the bottom that causes an error if you select it".
    Added a closing </select> to fix a reported Safari error.
Thanks to sonichouse for catching bugs.