Archive for January, 2009

Freebase – Structured Data

January 25th, 2009

freebase-logo.pngCan’t believe I’ve not spotted this before. Freebase is a freely editable store of structured data. If you want a table of programming languages or Greek poets then Freebase can provide. This has endless possibilities for tinkering and scripting with.

If you’ve not seen before then I strongly recommend a visit.

New Mac, Wii and DS

January 25th, 2009

gallery-big-01.jpgI’ve not been posting in a while as I received a new Wii, DS and Mac over the Christmas period which has kept me very busy – thats on top of working all the hours god sends!

I’m not rich – nor is my family. There was a windfall that enabled presents to be bought and so here I am. Very grateful and happy.

The Mac is bedding in nicely – although I’ve spent more time blogging with it than coding so far. That maybe a sign of things to come as I am considering moving this blog to a new home and changing name. I don’t see myself posting as much dev related stuff in the future. Watch this space.

The Mac is SO quiet and refined – its damn refreshing to use. Aluminium unibody case and the little mag power cable is wicked. :)

Wow – Mysql Site

January 2nd, 2009

When did this happen?

AbeBooks UK: Another Netvibes Plugin

January 2nd, 2009

Abebooks LogoI’m loving the Netvibes plugins at the moment and I produced a second one today.  This time I’ve decided to have the body of it as static HTML rather than generating it using the included widget API.  It seems to start faster as a result.

The widget is simply a search box for finding cheap books at the Advanced Book Exchange.  If you’re a book worm you’ll love the site.  Its had millions (seriously) of rare, used and new books from across the world.

Wicked stuff.

You can view the widget in all its splendour here.

First Netvibes Plugin

January 1st, 2009

Just finished my first Netvibes plugin.  Hopefully it’ll be the first of many to come as I’ve now got the hang of the Universal Widget API (UWA) now.

My first widget is mainly for UK users who take a lot of flights.  Its a Lastminute.com flight checker widget so you can find the latest pricing info for a given date.

You can view it and install it here.

lastminute_logo_368x701

How the UWA Widgets Work

They’re dead simple in principle.  So simple a widget is nothing more than a specifically formatted HTML document.  You have to make sure you’ve got a few things in there like a UTF-8 encoding attribute at the top and a few other bits but the skeleton document helps a lot.  Other than that you can use Javascript and style it with CSS all like a regular HTML document.  More about UWA.

Forms

This was a serious pain in the arse.  The form documentation for Netvibes is rubbish and the forum had little of use – although I was helped by Xavier and managed to get round my problem.
Basically in Netvibes – don’t use a form.  Or at least don’t submit a form in the traditional sense.  It won’t work, and even if you manage to get it working it’ll die on Mac.  You need to emulate the behviour of the form by packaging the variables up and executing the widget.openURL() function.  Thats for GET forms.  POST forms will need to use the Ajax API Netvibes includes.

Packaging Up Your Form to Get

Someone else may find this useful…

var formElements = document.lmfForm.elements;
var qString = '?';
for (el in formElements) {
  if(formElements[el].name != undefined && formElements[el].value != undefined){
    qString += formElements[el].name + '=' + formElements[el].value + '&';
  }
}
widget.openURL('http://www.example.com/script.php' + qString);