Consulting

Currently working for Bryght, a Drupal-powered hosted service. Please contact the company if you are looking for Drupal-related consulting services.

Currently working for Bryght, a Drupal-powered hosted service. Please contact the company if you are looking for Drupal-related consulting services.

(Re-)Documenting My World With Drupal and the Nokia N95

October 3rd, 2006

After I tell two people an idea, it probably makes sense to publish it somewhere so that someone can go out and implement it. Here are the ingredients:

  • a site powered by Drupal 4.7
  • Location module for Drupal
  • GeoRSS module for Drupal
  • Aggregator2 module, though its successors are currently in heavy development
  • A . Or any mobile device that combines GPRS, GPS, and a camera and a phone. The phone part is completely unnecessary, but that conveniently limits us to the Nokia N95.
  • (optional) Google Maps and Views modules for Drupal

I say optional for the last one because you would only 'need' it to display a map on your own site. (Which I do: more on that later.) Some assumptions, using Vancouver as my example. Since we all have a natural urge to let complete strangers know not only that there's nobody back at home but also to let those same complete strangers where we are at all times, say I'm walking in Stanley Park and want to make a 'live' document, with a map, of the walk I'm taking. With photos and video, say. Say, also, that I have a reasonably-priced unlimited data plan, the same reasonably-priced unlimited data plan I moan and groan about not having. Here's what would happen:

  • I would take a photo and automatically upload it to Flickr, the GPS taking care of the co-ordinates and geo-tagging as I walk around.
  • Flickr then displays it on its map. That's really neat, but not the exciting part. In the RSS feed, Flickr adds the longitude and latitude to each photo's item.
  • My Drupal-powered site takes in the RSS feed, and thanks to the Aggregator2 module + the Location module + the GeoRSS module, automatically adds the longitude and latitude to the individual item.
  • I map it on my site using the Google Maps module. That's really neat too, but still not the exciting part.
  • The GeoRSS module also adds longitude and latitude to my site's RSS feed.

That way someone could come along and use my liberal "Attribution" (no other restrictions) Creative Commons License and do something with it. Add it to a mapping aggregator (like mapufacture that displays crimes committed in Stanley Park, which would be so nuanced as to point out where crimes didn't happen. So hopefully, assuming the current odds of my being involved in a crime at any given moment, it will map out that data point at that particular moment.

We now come ever closer to having all the tools we need to not only document our environment, but to let others re-document it in different, unimagined ways. Right now the process is fairly time-consuming: before even knowing about GeoRSS, through a process involving manually looking at Google Maps of the area, then parsing out the Google Maps URLs for coordinates, I pasted in longitude and latitude for each station so far on my SkyTrain Explorer walks. That gets me a cute map of each walk (clicking on the label goes to the walk's individual page), and thanks to the SkyTrain walk feed (generated with the Views module) that contains geographical data (courtesy the GeoRSS module) you can get the points plotted on an external map. Which also happens to use Google Maps, but the point is that the service, through a standard to output location data in RSS and a few other pieces, someone else can use an external service or pull down my RSS feed and do something with my location data.

By few, of course, I mean "a lot of", since none of it comes out of the box, as you need to glue together a content management system, modules, and a little bit of manual labour. The Nokia N95 takes care of the manual labour part, and the wifi modem makes grumbling about lack of a GPRS plan almost pointless. (Almost.) It also takes out of the hard work of learning mapping, mobile devices, location-aware tools—and increasing my own location-awareness—as I try them out, since they'd all happen at once. And it would be fun!

I'm not worried that some evil-doer has, after reading the above, gained knowledge to hasten our doom. I'm 100% confident they would have figured that out for themselves.

Seattle Drupal Camp Second Day

July 2nd, 2006

My co-worker Boris surprises me with a link from his work weblog to my notes about the first day at Seattle's Drupal Camp, so I'll take that as a nudge to write a little about Thursday, the second day. For the first session I parachuted in to the first session for a sleeping-in Steve McKenzie—no worries Steve, I woke up an hour before getting there myself—to talk about modules. I prefaced my remarks with the modules I worked on: the Pirate module, a Flickr module which I'm abandoning because Flickr Hood has similar features (I've offered to help out with it), a little module, called Quotable, that converts all <q> tags to text with curly quotes (which I use to this day, inspired by Mark Pilgrim's article) and, of course, the On This Day Module (source code). I then tried to answer questions as best I could until Steve got there then jetted to the user room again, where I demonstrated podcasting in Drupal (I ended up just pointing to the long article I wrote for Bryght's support site as I didn't have anything prepared for the demo—which is okay, since I didn't expect to demo anything) and the powerful if sometimes complicated taxonomy system.

I misspoke by saying "vocabulary", "taxonomy" and "term" were Drupal words: they are terms borrowed by Drupal from library science and other fields that rely heavily on categorization. I still stand by, however, the idea that many users are confused by the terminology and, since many are used to systems with 'categories', such as Movable Type and WordPress, the way Drupal describes it and handles it internally can be daunting. (A brief aside: Just a Gwai Lo uses taxonomy terms in two ways: one which uses taxonomy terms to create what look like weblogs to the outside world and tags.) I expounded briefly on the disadvantages of tagging, or rather a perceived disadvantage, in that it tends to make a site's categorization look messy, especially if the site has a large community. I say 'perceived' because there is value in the mess, that site administrators and community members will find surprises in what people think something should be tagged as. Boris, who managed to survive explaining what the Drupal core modules do with his voice intact, spoke about another disadvantage about tagging, in that there lacks a standard way to separate tags. del.icio.us and Flickr separate with a space, Flickr allowing quotes but not del.icio.us, and Drupal sites throwing in commas as separators, meaning you can't have tags with commas in their name.

For the last session, Gregory Heller demonstrated CCK, Views, and Content Template. (Some people thought he was saying "content" when he was saying "contemp"; I noticed the night previous that the Drupal.org project's URL has it cleverly as "contemplate".) This bundle of modules make for a highly customizable site, far much more than is currently possible without writing your own content module.

(I started experimenting with CCK and views earlier in the week on a test site. Not really knowing that Gregory would cover it, I installed Content Template the night previous and, since the theme to his site was a little mangled to see the configuration page, I stepped in to show what it looked like when formatted properly. Since aggregator2 is busted, at least on 4.7 sites, I may just use CCK and views to benefit from strange new content types with strange new ways of displaying those content types. If I can get Amazon S3 to work for me, that's where my mundane SkyTrain videos will go, along with other 'static' files.)

Earlier in the day we ran into the Robots who are responsible for 43 Places among other sites, and then while at their office, wondered what they really thought of 43 Thongs, a parody of their 43 Things. They have a sense of humour about it—which comes as somewhat a relief seeing as how I used pretty much the exact same look—and reported being slightly disappointed that it wasn't about the uncomfortable underwear.

Over the course of those 3 days (which includes Tuesday evening, when I lost my Nokia 7610) I got to liking Seattle a bit more, after, on the second day, having walked down Pine towards the water, guessing correctly that if I was walking downhill I'd be in good shape for actually finding it. Though I don't regret leaving when I did—the resulting downtime spent at home and then with some friends I got on Friday made the decision feel right—if I'm in a similar situation I'll consider spending an extra day on my own to explore the city a bit, and maybe take in a major league sporting event like I thought I might when in Seattle.

Drupal Camp Seattle First Day

June 29th, 2006

While Gregory Heller was busy trying to fix the wifi situation at the Richard Hugo House, I parachuted in to describe what Drupal was (whatever you want it to be, was my answer) and answered a few how-to questions. It was a good start, since it got me talking and seemed to established me as somewhat of an expert in the platform. My joke of the day came at introduction time, where I said that people saw me as the public face of Bryght (which is partially true, I should have said I was one of the public faces of Bryght) and that when people email the support team they start of with "Hi Richard" instead of "Hi Bryght Support" (which it turns out is correct, I handle most of the queries). As with any event involving Web 2.0 types, there are photos, some at the unwieldy drupalcampseattle2006 tag on Flickr.

(There's probably a best-practice or etiquette we can establish where if the wifi is slow or spotty we agree to upload photos at the end of the day at our various places of rest instead of all rushing to be the first to document the event. This happened at Gnomedex last year, and though a smaller event, it seemed to overwhelm the resources.)

On the 'conferences for introverts' front, having tables set up in a square or rectangle where you are forced to introduce yourselves at the beginning of the event—and where you wear clothing with the logo of the company you represent—helps break the ice. Going only on my experience, I assert that introverts have difficulty talking about themselves because, partly, they think what they do isn't really all that interesting. When you go to something where what you do is 100% relevant to that event, then it's a little easier. A lot easier? I wish I had the same confidence talking to people about hobbies—such as they are, though that's what my weblog is for—as I do about work, though working for a startup where the ideas and people with them are as fun and interesting as the crew I'm here with, work often feels like fun, something I'd do if even if they didn't pay me.

Note that I'm not complaining that I get paid to do this.

Adding Measure Map Tracking Code to Your Drupal Site

December 23rd, 2005

I've been invited to the alpha for Measure Map, a pretty statistics system geared towards weblogs and weblog-like sites. They didn't have instructions for Drupal. After a couple of false starts, here's how I added the code to my template, basing it on the WordPress instructions. These instructions are for PHPTemplate-based themes.

  1. Add the "footer" code to the bottom of your page.tpl.php, somewhere near the <?php print $closure ?> tag. Use the code given to you by MeasureMap, as it includes information specific to your account.
  2. In the node.tpl.php file, add the following outside of an "if" block (the first if statement in my code should stay there, however, that's how it knows it's the individual item's page: Note that if you have custom node templates, you will need to add the above code there (e.g. node-blog.tpl.php for the 'blog' content type) as well.
  3. In the comment.tpl.php file of your theme, add the following code outside of an "if" block:<

This should work for Drupal-, CivicSpace- and Bryght-powered websites as long as they use the PHPTemplate theme engine. (Bryght, for whom I work, uses PHPTemplate on all sites.)

I haven't tested it extensively, so let me know in the comments if it doesn't work properly and I'll make the appropriate corrections, both here and in my template.

Syndicate content