Am trying to implement the autotagging feature for our site. But it seems that the autotagging feature works only with the default node body field. How do i configure it to use a custom CCK description field (or some other cck field) ?

CommentFileSizeAuthor
#2 autotagging_hook.patch809 bytesIncrediblyKenzi

Comments

IncrediblyKenzi’s picture

Category: support » feature

Right now the autotagging module acts on a combination of the title and body field.

That being said, it's difficult to support arbitrary fields from a ui perspective.

What I can do is offer the ability to hook into the module right before the tag fetch so that other fields can be appended to the processed text. That should do the trick. Sound good?

IncrediblyKenzi’s picture

Status: Active » Needs review
StatusFileSize
new809 bytes

Try the following patch.. It's a one line change, but allows you to define a function in a custom module, ala:

function mymodule_autotagging_api_prefetch(&$node, &$text) {
  // modify/append $text here, e.g.:
  $text .= $node->field_my_custom_description[0]['value'];
}

If this works for you I'll commit it.

mesh’s picture

Sounds goooood.. also if the cck field itself has a 'include in autotagging' feature would be better IMO. Thanks for your reply..

mesh’s picture

chose not to use the cck fields for now, but will definately test your patch and revert back soon..