Four Kitchens
Insights

Dynamically attribute content in Drupal using the Author Taxonomy module

2 Min. ReadDevelopment

Attributing a story, image, or blog post to more than one person can pose a problem on many web platforms. In the print publishing world, it’s simply a matter of adding another name to the byline or tacking “Additional reporting by Sue” to the end of a piece. (Nowhere does the poor designer or typesetter get credit for laying out the page!)

On the web, priorities are flipped. Instead of attributing a piece of online content to its author, most web software attributes content to the user who posted it on the site. Countless sites display ugly bylines like “nyeditor5” or “harry_henderson” instead of a properly formatted name.

And what to do about stories with multiple authors? They’re usually given credit in the first or last line of the content itself — a surefire way to reduce a semantic web evangelist to XML-encased tears.

Enter the Author Taxonomy module. We initially developed this module for That Other Paper, an Austin-area, online magazine we used to publish. To maintain a cohesive voice and layout style, we required all content to be vetted by one of our few web-savvy editors prior to publications. As a result, virtually none of the content on the site was placed there by its original author.

We experimented at first with creating a properly formatted username for each contributor: “Sue Smith,” “Hilarious Jackson,” and so on. This turned out to be a hassle, as users are unaccustomed to Usernames with Caps and Spaces. Even then, we couldn’t properly attribute content to more than one author. It was time for a custom module.

Author Taxonomy combines the power of taxonomies with the real-world demands of professional publications. Features include:

  • New authors can be created on the fly with “Tags” (“Free tagging” in Drupal 5.x) enabled.
  • Multiple authors are displayed using serialized text: “Sue and Jan” or “Sue, Jan, and Bobby.”
  • Names link to their taxonomy term pages, providing readers with a quick shortcut to all posts attributed to a particular author.
  • Site admins have the option of automatically overwriting the “real” node author — that is, the user who posted the node — with an author term if a matching username is found.
  • The date display is fully customizable and can be disabled completely.

If anybody has any suggestions for improving the functionality of Author Taxonomy, please add them to the module’s issue queue. We’d love to hear ’em.