Hi,

I saw on this page great code for feedapi http://www.boldsource.com/portfolio/rem-tour-website-drupal?page=1
I couldn't find the download link, but as you can see this code is in.
May be great to insert this into feedapi as the feedapi_taxonomy. module?
Code from this page:

/**
* Implementation of hook_nodeapi
*/
function feedapi_taxonomy_nodeapi(&$node, $op, $a3 = NULL, $a4 = NULL){
  switch ($op) {
    case 'update':
    case 'insert':
      // If we have a new feed node check its parent to see which taxonomy terms it has
      if ($node->feedapi_node->feed_nids) {
        $query = db_query("DELETE FROM {term_node} WHERE nid = %d", $node->nid);
        foreach ($node->feedapi_node->feed_nids as $key => $nid) {
          $parent = node_load($nid);
          foreach ($parent->taxonomy as $key => $term) {
            $node->taxonomy[$term->vid] = $term->tid;
          }
        }
        taxonomy_node_save($node->nid, $node->taxonomy);
      }
      break;
  }
}

Off course all credits to boldsource for this! And sorry if this post is a double post.

Greetings,
Martijn

Comments

summit’s picture

Component: Code » Code (general)

Subscribing, great if taxonomy usage would be more supported by feedapi!
Greetings,
Martijn

AntiNSA’s picture

subscribe

indytechcook’s picture

How is this different then the FeedAPI Inherit module?