Project:Author Taxonomy
Version:6.x-1.8
Component:Miscellaneous
Category:feature request
Priority:normal
Assigned:Unassigned
Status:active

Issue Summary

Hello,

I'm trying to do automatic addition term to database.

In author_taxonomy.module (just for example):

<?php
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