Back to my page

Developers


Widgetize your Nabaztag!

The cool thing about seeing the UWA community blossom, is to witness developers’ passions and interestes, which translate into cool, funny, creative or downright necessary widgets. Developers can use the DevNet forums to showcase their widgets, and we’ll now try to give our favorites a little popularity boost on this blog.

The latest example of a passion turning into useful widgets came right today, when UWA developer Landry Schmitt published a very complete post about the set of Nabaztag-dedicated widgets (he calls them “nabgets”) that he developed as wrappers around his own web applications/games from NabZone.com. With his five “nabgets” – and probably more to come – Landry is helping bridge the gap between two geeky must-haves: Nabaztag and Netvibes.

Let’s quote Landry himself:

Biorhythm: Widget generating a textual message and ‘choreography’ according to you current biorhythm.

Wake up your Rabbit: Send your Nabaztag to sleep each time you want.

Nabaztag Love Test: Ask your Nabaztag if your dream partner loves you.

Magic 8 Ball: Ask the Nabaztag a question, give it a shake and then wait for the ‘Spirit Slate’ voice to give the answer… A divination tool that mysticaly answers your questions.

Fortune Cookies: Your Rabbit breaks the cookie, reads the paper included in it and eats it.

You can find all these widgets on Landry’s Ecosystem page.

UWA-Nabaztag

What is interesting here is that Landry created widgets that can work both ways: you can use them to control your own Nabaztag(s), or to send messages to your friends’ own. This might not seem much, but this means that these widgets will be as useful on your own, private Netvibes page (or iGoogle, Live.com, Apple Dashboard, Windows Vista, Opera… you know the drill) to make contact with your Nab’ or your friends, but also on your forthcoming Netvibes Universe, where these widgets will let your visitors contact your Nab’ :)

Furthermore, these widgets are proofs of how easy it is to build a widget if you already have a working service on the Web: they mostly use a simple combination of UWA’s tried-and-true Preferences form with a single IFrame to wrap a minimized version of the original service, and voilĂ ! A good-looking, portable and entertaining widget!

For those who never thought of using an iFrame to circumvent some of UWA constraints, rejoice! As these widgets showcase, setting-up an IFrame couldn’t be easier with UWA. Here’s a simple code that would do it, inspired by what Landry used, and which you are welcomed to build upon:

widget.onLoad = function() {
  var myID = widget.getValue('myID');
  var theURL = "http://example.com/widgetscript.php";
  theURL += "?theID=" + escape(myID);

  widget.setBody("<iframe src='" + theURL + "' height='140'
    width='100%' frameborder='0' align='middle' scrolling='no'
    allowtransparency='false'></iframe>");
 }

Thanks Landry for this nice set of widgets! Hope to see some more leveraging the Nabaztag platform!

Update: well, it couldn’t get any sooner :) While we were finishing this post, half-a-dozen more Nabaztag widgets were submitted to Ecosystem by user Comezo. Built using the very same IFrame technique (and code) that Landry used, those are built for registered users of the NabZap site.

Tags: , , , ,

2 Responses to “Widgetize your Nabaztag!”

  1. yoan Says:

    because widget.onLoad belongs to widget, you don’t have to use widget but “this” should be enough. nope?

  2. Xavier Says:

    Nope. That would be true if ‘widget’ was defined in the whole scope of the widget. That’s not the case. Just try this:

    
    <script type="text/javascript">
    widget.onLoad = function() {
      widget.addBody('Test');
      }
    </script>
    
    

    …and…

    
    <script type="text/javascript">
    this.onLoad = function() {
      widget.addBody('Test');
      }
    </script>
    
    

Leave a Reply


Business

Our Widget Marketing solutions

Developers

Build once, run everywhere.

Community

Get involved, get localized.

Press

News. Media kits. Press releases.