vijayjoshi.org - php | javascript | ajax | and all things web

My first igoogle gadget

Update:

A new functionality to the gadget has been added today. Due to this the widget will now display a random quote each minute. You can also set the time limit for reload. Available options are 1 minute, 2 minutes, 5 minutes and 10 minutes. Just choose “Edit Settings” from the toolbar of gadget. To have this functionality you may have to delete and again add the widget to see the changes. You can add it from the button below.

Add to Google

Yesterday I wrote my first gadget for personalized Google home page or more popularly known as iGoogle. It’s a small widget that displays “ways to irritate people”. You get to see a new way to irritate people each time you reload the page.

There are some profound tutorials on Google as well as videos on Youtube which edify you how to build these widgets from scratch. I wrote it more from learning perspective. So, let me explain you how I wrote my first gadget.

I read some tutorials, signed up for iGoogle sandbox and decided to go for the OpenSocial API 0.8 and wrote it.  Choosing OpenSocial was obvious because your application has a variety of containers to be chosen from them, like iGoogle, Myspace, ning, friendster, orkut etc.  For this you can see the source here. Don’t get confused by the name orkut.xml.

Although my initial intention was to write it for orkut. Your browser may not support display of this image.  However, I wrote it and tested on iGoogle sandbox which worked well. But when I submitted it to Google directory, and asked some friends to test it, it failed to work. Then I came to know through Google-Gadgets-API group that OpenSocial is currently supported in sandbox only, not in production. Grrrrr…

As I was desperate to see it in production, so I turned towards Legacy Gadgets API and wrote it again. Source code for the new widget can be seen here. There is nothing much to see in this file. All other work is done by the php script it points to.

Eventhough this is the simplest form it can take. I am planning to extend it further. A basic functionality, that I think should be there, is allowing the user to set the number of minutes in which the widget will fetch a new quote. Then the user will not have to see the same quote until he reloads the page or that frame. Besides this, couple of other features will be there.

For now, you can add this widget to your iGoogle page. This will help in improving widget’s ranking and visibility and moreover, it is fun. After all don’t you want to irritate others sometimes?? So, what are you waiting for? Do add it!!! Here is the link

See “wAyS tO IrRITaTe” on your Google homepage

Related Posts

Posted in : FAQ, Technology
Tags: ,

Leave a Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

*

* Copy this password:

* Type or paste password here:

55,809 Spam Comments Blocked so far by Spam Free Wordpress

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>