Expert means that you know more than anyone you need to talk to about the subject.- Timothy Ferriss
One of the losses in the transition was the "random photo" widget I had running in the header of my website. When I clicked "published" in my old system, it would run a perl file that would find all pictures and build a giant static javascript file that could randomly select and load one. With the most, all of my photos are now hosted in Picasa and I can't do that. So I just let it go. Or so I thought.
But one particular friend (hi Timmy!) told me that I was not allowed to do that! He asked (demanded?) that I fix the random photo display on my website. Since he might name his firstborn child after me, I felt like I needed to figure it out. I have! It works! Let me tell you how!
I am using JQuery and Picasa Web APIs to do it and it wasn't that hard! Wasn't that hard at all with a grand total of 30-lines of javascript that would be a lot more compact if I wanted it to be.
One call to get total number of photos in the album:
https://picasaweb.google.com/data/feed/api/user/username/albumid/albumId?alt=json&max-results=0&fields=openSearch:totalResults
Generate a random number between 1 and the result and then one more call to pull back the URLs for that image.
https://picasaweb.google.com/data/feed/api/user/username/albumid/albumId?alt=json&max-results=1&start-index="+showPhoto
Then you get a random photo!