3

Here's the scenario:

  1. A writer about celebrity gossip posts a node (article) on a Drupal website.
  2. I have a module that scans the article and automatically creates taxonomy fields based on celebrity names posted in the article.
  3. These taxonomy "terms" are based on a firstname/lastname list of celebrities that will be high-volume and perpetually growing.
  4. This list of celebrities will have various fields to render in-depth profiles of the celebrities
  5. Content nodes can have multiple celebrities attached to it.
  6. Celebrity nodes can be attached to multiple content nodes.

Here are my assumptions:

  1. The ever-increasing volume of celebrities and their atypical field requirements make it necessary to create a table specifically for celebrities.
  2. The taxonomy-to-node relationships are really nothing more than node_id and celebrity_id in a relationship table.
  3. While writers can tag an article automatically with my module, they will likely need to sometimes add additional celebrities due to misspellings or scanning errors, thus the celebrity firstname and lastname will need to be a part of the tagging process.
  4. Due to name changes, misspellings, etc, we don't want to use celebrity firstnames and lastnames as unique IDs

So, here are my questions:

  1. Is there a module already built that renders this functionality?
  2. Is there a module already built that helps create a taxonomy that can represent a relationship between a node and entities in a custom table, not just a taxonomy table?
  3. Is this functionality already present in a Drupal distribution somewhere?
  4. Should I create a custom module to solve this problem (i.e. I won't be re-inventing the wheel)?
2

You don't specify Drupal 6 or 7. If you can, use 7. Then you can do the following

  • Have your content (gossip posts), as nodes.
  • Put your celebrity names as taxonomy terms
  • Apply whatever fields you like directly to the taxonomy term. No need for attached nodes or custom content.

    There are several auto tagging modules out there, Open Calais is free and would suit your needs. You could even just use the 'Person' results from it to only tag celebrities.

    Drupal 6, did have some issues with very large taxonomies (over 100,000 terms and 2,000,000 individual tags). D7 has sorted most of these, so it is unlikely that you will have to go down the custom code route.

    If you do you will not only need to sidestep the node system, but also the taxonomy system and mysql, so it is not as easy as creating a custom table.

1

Why not make each celebrity into a node, with their bio as a field, and then use a node reference field for the article?

  • I'm a bit concerned that because the "celebrity nodes" are going to be treated so much differently than the "content nodes" that keeping them in separate tables is better from a design perspective. I could be wrong. Content nodes can have multiple celebrities attached to it. Celebrity nodes can be attached to multiple content nodes. – Randy Burgess Mar 8 '11 at 1:22
  • Nodes are very flexible, there is nothing wrong with having two very different node types, but see my answer. – Jeremy French Mar 8 '11 at 8:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.