Autolink Module Update
June 30, 2005

I’ve updated my Drupal module Autolink to version 1.1.

To use Autolink, you define a Drupal taxonomy and add some terms to it.

When any of these terms occurs in text on your site, Autolink automatically adds an html link to whatever URL you have specified for that term. So, for example, you can enter terms for all of your friends, then any time you refer to them in a post, their names will automatically be linked to their blogs.

The main change in this version is that you can specify some replacement text, so that when the link gets created, the replacement text is displayed instead of the original text.

As an example of why replacement text is useful, say we defined a term “Apple”, to be linked to “http://www.apple.com”. The danger with this is that an article containing the word “Apple” in another context might inappropriately be linked to the Apple website. We could use a less ambiguous term, like “Apple Computer Inc.”, but we don’t want that text to have to actually appear in all of our articles, because it is unnecessarily formal. The solution is do match for “Apple Computer Inc.” in the article, but provide a replacement that converts it to “Apple” in the final output. Now it’s unlikely to be matched incorrectly, but the text will still read ok.

For more details, see the Autolink project page.

« Endian issues Old Stuff »
Got a comment on this post? Let us know at @elegantchaoscom.