Drupal + Taxonomy + Tagging + automatic references in nodes

I just had an idea. I know: what a rarity! Eye-wink
It'd be nice if the field API of the coming Drupal release (v7) would support adding fields to taxonomy. I'll explain why ...

Most sites use free tagging in Drupal to tag posts/content. Mostly these tags are rendered in a list somewhere at the bottom or top of posts. The tags come mostly from words already present in the content. There're already modules supporting auto-tagging (extracting words from the post and saving them as tags + associating the tags with the given post). However my idea is to support automatic references ... based on the work already done in the auto-tagging area.

If admins could define an URL field for taxonomy terms, one could (manually) specify the website that best explains the given term and a filter module could parse the content and match words to existing terms and create a link from these words pointing to the matching taxonomy term's URL. Eg. if I write the word Drupal in a post, it'd be automatically converted to a link pointing to drupal.org. Smiling And as an option to this filter, the site admin could enable automatic Wikipedia linking as a fallback. Thus if a term already exists and has no URL assigned, it'd be converted to a link pointing to Wikipedia.

To avoid having every second word converted to a link Smiling, we could add some intelligence:
  • one could limit the number of auto-links in a post (and some logic would select the "n" most important words to be linked)
  • one could limit auto-linking to words in capitals that are not the first word in a sentence (thus only "names" would be converted)
Update: there's a module named Taxonomy Fields which supports assigning fields to terms, but unfortunately it was abandoned as of Drupal 6.x. Sad
Update2: I've taken a quick look at various descriptions of the upcoming Fields API in Drupal 7. It seems at first glance it's not going to support assingment of fields to taxonomy terms (at least not out-of-the-box). Actually here and there a few docs mention something like "assigning fields to content or entities", but I did not see the latter explained any further. The detailed description of the API was talking all about content types and transforming the Drupal 6 version of CCK into the Field API. Let's wait and see. At this point I think at most only the project leader(s) of the Field API development could tell whether fields will be supported for all kinds of entities (including taxonomy, users, ...?) or just nodes.

Syndicate content