I’d like to start putting up some of the code I wrote in developing ShareMyAlbum.com. If you haven’t checked it out yet, and are interested in an easy way to customize picasa albums, please check it out. I think you’ll be pretty happy with the results.
The initial development of my Picasa RSS gallery required the user to paste their RSS feed into the tool to get their albums. Few problems with this:
1. It’s not the easiest thing to explain, especially for normal users. I went so far as to create a screencast showing people how to get the picasa rss.
2. People will mess it up and copy their account RSS rather than their album rss. It happened twice, from users I know are familiar with this stuff. I had to write a script to check for valid rss feeds from picasa, lots of time wasted.
3. The biggest problem, people would have to leave the site. Maybe you get distracted when you log into the picasa web, maybe you realize it’s too much work to set up an album, not good. I wanted to make things easy, let users just put in their google id and their albums show up.
So here’s the solution. It’s a two stage script that first checks your google id and downloads the rss feed for your albums. if that’s successful, it’ll show you a list of the albums available, with matching RSS feeds. Then for a proof of concept, you can view all of the photos in that album.
The script is pretty self explanatory, took me just a few hours to put this whole thing together once I figured it out. There’s only a few things you need if you want to install it on your server:
index.php – The guts of the script, where the magic happens
displayImages.php – My Picasa RSS sript for pulling out the images, not needed but helps the demo
/temp – a directory to store the user album list xml while you parse through it
/feeds – a directory for storing the selected feed xml


Post a Comment