Press enter after choosing selection

Ann Arbor Cooks: behind the project

by ejk

Now that the Ann Arbor Cooks project has been officially launched, I thought I would post a wrap up some of the cool pieces of the project.

As discussed before, I created a new custom node type to store the recipe data. This was an ideal solution because it allowed us to use drupal's existing security and content creation functionality. Plus, tags, categories, and comments are a snap!

On the recipes themselves, I needed a way to link to large versions of the original pages which had been scanned. I found a javascript library called lightbox which handled the task quite nicely with some animation. Luckily, a group of developers had written up a nice drupal module that allows you to easily add the lightbox functionality into your drupal website. I pulled publication data for the book from our database and included it in the image's caption when you viewed the popup.

Here's an example:

In order to create the Browse Recipe page, which is a clickable listing of the recipe categories, I downloaded and made some modifications to the taxonomy_list drupal module, adding a count of the terms in the taxonomy by using the drupal API function taxonomy_term_count_nodes(). I also added a bunch of CSS to change how the list was displayed.

Our books scans were originally huge TIFF files, so I used the handy program Image Magick (available for Windows, OSX, and Unix/Linux) to do some batch conversions to JPEG thumbnails and the large images. I was able to throw those into a new directory under the standard drupal files directory and link to them from each individual recipe node.

The majority of the time I spent on this project (coding PHP and CSS) I used Komodo Edit and the Firebug extension for Firefox, running on Ubuntu Linux.

Graphic for blog posts

Blog Post