Intelligent links using Apture in Drupal

Summary: In about 5 minutes I got Apture set up and running in this Drupal blog -- it was quick, easy, and best of all, it works!

Steps:

  1. Get a user ID and password from the Apture website
  2. Embed one JavaScript call just before the </body> tag in every page
  3. Reload the main page in Firefox or IE and the Apture links were working!

It really was that easy (and no, I'm not in any way associated with Apture).

A step back, though -- what IS Apture? First off, it isn't Apple's image manipulation software, that's Aperture...

I read lots of technology blogs on a daily basis, and hadn't heard of it. Once in a while I check out the always interesting blog of Lawrence Lessig and saw his posting fantastically cool code to watch which had the following video:



Apture Getting Started Tutorial from Tristan Harris on Vimeo

Looks good to me, but usually these things in Beta take forever to get into, unless you know someone, right? But I figured I'd at least sign up and get access to the system sometime in the next few months, but turned out I was wrong, I got a confirmation e-mail back within a few minutes! I was in, so I might as well give it a try.

Getting things set up
Once I logged in the site gave me a bit of JavaScript code, with a unique siteToken to include just before every </body> tag on my pages.

Normally that isn't a problem for me, as I tend to write my own HTML or PHP, but in this case I'm using Drupal, so what to do? After a couple of minutes looking through the forum I found the magic spell: edit the page.tpl.php file for the theme I'm using (still bluemarine) and add the JavaScript call there. It was really that simple, and there isn't even a point in me including the code here; when you load the file scroll to the bottom and you'll see where to add the code.

I saved page.tpl.php and ftp'd it back to my web server and then reloaded my main page, and that was all I had to do. Links that I already created to Wikipedia automatically had the little Apture icon for Wikipedia, right in line:


Adding new links
The video above does a better job that I could showing you how easy it is to add new links. I used the process to add links like the very first link on this page, to the Drupal Wikipedia entry. In that case there was no change to the source, Apture keeps all that meta-data elsewhere.
Wrap-up
When I tested this page on a different machine I was surprised to see how many Apture popups there were on the page... Each seems to have a "Don't show this page again" link, but I wonder if this feature will irritate readers more than it will help them... let me know in the comments, here, and who knows, maybe I'll have a How to remove Apture from Drupal sites posting here one of these days...