@Commented-on Follow up
Jan 2, 2006 · 3 minute readSince the brief discussion based around ben’s original idea for using del.icio.us to track comments you have made on other blogs I’ve been having a play.
The main issue that people saw was simplicity, which I see falling under two headings:
- Ideally it should just happen. If you comment somewhere (and opt in, obviously) you browser or online service should keep a track and give you access to this data. This would require changes to existing blogs and in particular the common software like textpattern or the other one
- Saving that for later, a simple one click service which does not get in the way and achieves the same thing should be suitable.
It’s the later that I’ve been playing with and thought I’d present here in it’s early stages. The plan is as follows:
- A bookmarklet collects the data from the page (title and url) and sends it to an intermediary page, rather than del.icio.us.
- The intermediary page prompts for a username and password (HTTP authentication) and adds the post to del.icio.us automatically.
- The page is then either closed or redirected back to the page from whence the request came.
The bookmarklet
The bookmarklet section is simple enought modifications of the existing del.icio.us bookmarklets. See the download at the end of this post for details.
Intermediary
The intermediary page uses HTTP authentication to ask for a del.icio.us username and password (note that I’m not storing these at all, or for that matter at present checking if they are correct.) This needs only happen the first time you use the page if you use your browser to store the details or once per browser session otherwise.
The page then makes a request to the del.icio.us API using the lovely PHP library from dietrich.ganx4.com/delicious/
Return
On a failed request the page reports that an error has occured (I’ll expand on this with more pertinent error messages as time permits.)
On success however we have two options, depending on the bookmarklet used. The default is to close the page down, with an alternative beiong to redirect back to the refering page. We do however run into a slight problem here with Firefox. Our favourite browser will only allow windows to be closed via javascript if they where opening by a script (NOT including our bookmarket). Internet Explorer has a similar set up where it prompts the user for an action, although a simple fudge get’s us around that one. At the moment therefore the close window bookmarklet is of limited usage for Firefox users.
Future
This could quite easily be expanded for use on a blog as the requests are simple HTTP requests with query string parameters. However the security implications of giving out your username and password would likely limit this approach. I’m going to look into the sending of bookmarks to others that ben mentioned and see if that can be used here – as hopefully that may only require you to give out your username. A service like gravatar could then be used to do lookups between email addresses and del.icio.us usernames and away we go.
Any thoughts, comments or suggestions welcome. And feel free to try out the bookmarklets. I’ve included a handy download below including a quick readme and the bookmarklets.