Saturday, November 01, 2008

Picasa Slideshow: Creating a Google Gadget

A Google Gadget can be any HTML fragment and so it can contain any logic provided you use Javascript.

As soon as I got a couple of Gadgets in action I felt the necessity to play myself with them. Then I decided to build one which I think could be useful for others.

It is inspired in a good explanation[1] about how to embed a "Picasa Slideshow" (and others picture sharing sites) in a web page.

Take a look at the html page generated from the page that will be included in the XML file specifying a Google Gadget.

Sniff into the code.

Take a closer look to the whole URL. It starts with http://www.nestorurquiza.com/googlegadgets/picasaslideshow. I have hosted a simple Python script there which just accepts a GET parameter (see below) containing an RSS Picasa Album Feed to create a Slide show.

As mentioned above, you need to provide a parameter called rss which is basically the RSS link you can get from your preferred Picasa album. For the example I have used the same from [1]

After you have customized the URL including your own RSS and confirm it works like expected you need to URL Encode the whole customized URL (You can use one of the zillions of Online URL Encoding pages you can find in the WEB. Just Google it!)

Now you need to host an XML file with a similar format like the one you can find at http://localhost:8081/googlegadgets/xml/picasaslideshow.xml. Note the "href" attribute of the "Content" node which contains the custom encoded URL.

The XML URL from above will be used now from the "Add any Gadget From URL" Gadget as I explained in a previous post[2]

Now you can enjoy a slide show (or many since you just need to produce an XML file per album) of your favorite Picasa album in the left pane of your GMail WEB interface.

Of course if you get serious about Gadget programming you could use the official catalog directory[3] from Google to publish them, join the Google Gadget team and so on.


[1] http://philippe.chappuis.googlepages.com/slide-show-media-rss
[2] http://thinkinginsoftware.blogspot.com/2008/10/google-gadgets-everywhere.html
[3] http://www.google.com/ig/directory

2 comments:

Prac said...

Hello Nestor

I create the gadget here

Google gadget - SLideshow with Caption and Legend

And the example

Nestor Urquiza said...

The only thing is you have to change sizes of it if you want to get it in your GMail left pane as a gadget. I am sure sooner or later someone will provide an official customizable gadget for Picasa. I really enjoy having my slide shot right in the page that I visit most of the time (My GMail GUI).

Enjoy your wine ;-)

Followers