Active
Project:
Author Taxonomy
Version:
6.x-1.8
Component:
Miscellaneous
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
18 Aug 2010 at 15:40 UTC
Updated:
18 Aug 2010 at 15:40 UTC
Hello,
I'm trying to do automatic addition term to database.
In author_taxonomy.module (just for example):
function author_taxonomy_nodeapi(&$node, $op, $a3 = NULL, $a4 = NULL) {
switch ($op) {
case 'presave' :
// original code of module
$uid = $node->uid;
$a_term = array_keys($node->taxonomy);
$a_tid = $a_term[0];
$record = array('tid' => $a_tid, 'uid' => $uid, 'link_type' => 0);
drupal_write_record('author_taxonomy_term_link', $record);
break;
}
}
But, in the database tid recorded as zero.
How to write instead of "0" the real value of $tid?
Is it possible to include this feature in the module settings ?
Thank you