Page 1 of 1
Weather Plugin
Posted: Sun Mar 18, 2007 5:19 pm
by lamy
Hi!
I recently found a php class for the Yahoo! Weather API and decided to create a sidebar plugin with it.
Preview:
http://jan.inaustralia.de/
There's still some work to do, some things (Display temperature in Fahrenheit) don't work correctly yet and I have no Idea what to do with thise CVS files...
However, what do you think about it so far?
p.s.: first plugin I try to create

Posted: Mon Mar 19, 2007 11:17 am
by lamy
So,
here a first version. Should work correctly.
The only things you need are serendipity and php.
http://inaustralia.de/serendipity_plugin_weather.zip
Posted: Mon Mar 19, 2007 11:43 am
by mattsches
Works perfectly for me

Good work.
If you don't mind, I'd like to suggest some modifications:
- constants should be written in uppercase, I guess ("echo aktuelleswetter" confused me a little at first)
- leave the default server path empty, or set it to $_SERVER['upload_tmp_dir'], or, even better: $serendipity['serendipityPath'] . PATH_SMARTY_COMPILE (don't know if this actually works, but you should give it a try)
- add lang includes for UTF-8!!
- and maybe you can find a way to translate the weather conditions to other languages?
These are only my suggestions, for the next version maybe

Or, you could try to bundle it with our current weather plugin?
- Mattsches
Re: Weather Plugin
Posted: Mon Mar 19, 2007 11:56 am
by garvinhicking
Hi!
Looks nice, basically. It doesn't yet show anything more than the current s9y weather plugin, does it?
Maybe you'd like to show your code to us?
Regards,
Garvin
Posted: Mon Mar 19, 2007 1:13 pm
by lamy
Hi!
No, it doesn't show anything else - but it helps people like me who are not able to install this server plugin you need - my hoster does not allow that, for instance. The whole code is inside the zip file I posted above.
@Mattsches: Thanks for the suggestions! But what has to be inside the UTF-8-Files? I am actually working on a translation right now

.
Posted: Mon Mar 19, 2007 1:25 pm
by garvinhicking
Hi!
No, it doesn't show anything else - but it helps people like me who are not able to install this server plugin you need - my hoster does not allow that, for instance. The whole code is inside the zip file I posted above.
You can download the PEAR::Weather file and just put the files into your bundled-libs/ subdirectory of s9y, though.
Best regards,
Garvin
Posted: Mon Mar 19, 2007 1:33 pm
by lamy
Already read about that solution and tried it - but it didn't work =/
Posted: Mon Mar 19, 2007 2:27 pm
by lamy
Hm, how can I somehow define arrays as constants?
Posted: Mon Mar 19, 2007 2:30 pm
by garvinhicking
Hi!
About the weather plugin: How did you call your files/directories? If you extracted the Weather directory/files not as
bundled-libs/Services/Weather.php
etc.
then it can't work. But else it should.
lamy wrote:Hm, how can I somehow define arrays as constants?
That's not possible.
Best regards,
Garvin
Posted: Mon Mar 19, 2007 4:31 pm
by lamy
Hm, don't remember that...
However, I think this is the easiest way for me to use my plugin since it is ready to use

.
Apart from that, it made some fun to create it

...
p.s.: thanks
