When I saw cool random photo display gadget at wela’s blog, I also wanted something like that. Earlier I had a gallery2 installed, but when Google released picasa, I found it much easier. It actually optimizes the photos and then uploads. So, I switched to picasa. Fortunately, picasa have RSS feeds for each album :).
At first I thought of writing a normal wordpress plugin, but then since it’s in the sidebar, I thought of writing a widget. My blog was running wordpress 2.1 and either I had to install the widget plugin or install the new wordpress 2.2(Wordpress 2.2 comes with the builtin support for widgets). Since there are some bug fixes in version 2.2, I upgraded to that.
Then, after coping about three lines of codes into my theme, I widgetized it. Then, finally it’s writing the widget.
Actually, the widget was fairly easy to write because the wordpress itself has a rss parser. Even though, it doesn’t completely parse the RSS given by picasa, I managed to use some regular expressions and get the necessary values.
When I finished writing the widget, I realized that there is no point of downloading the RSS each time when someone requests the site. So, I put a download delay time and the stored the parsed RSS results as a wordpress option.
If you want to try this, click here to download. Copy the file into wp-content/plugins/widgets directory. Then, activate the plugin and add that to the sidebar from Presentation -> widgets. (You should have widgets plugin installed)