How to implement ACTION snippet "Add a node to a taxonomy term"?

doc2@drupalfr.org - June 11, 2007 - 14:13
Project:Actions
Version:5.x-1.x-dev
Component:Code
Category:support request
Priority:normal
Assigned:Unassigned
Status:active
Description

Please jump in http://drupal.org/node/135125 !

Many thanx

#1

westbywest - November 12, 2007 - 22:43

You can use this code by wrapping it in a custom module. That is, create the files custom_action.info and custom_action.module and then paste the code snippet visible at the URL above into custom_action.module.

After enabling the custom module, then go to admin->site building->actions to create new actions to add/remove terms.

Finally, you will need to create a trigger for this action to actually occur. This could be done by a cron job, user votes (e.g. with with the voting actions module), a workflow transition, or whatever is relevant to your project.

#2

westbywest - November 12, 2007 - 22:43

You can use this code by wrapping it in a custom module. That is, create the files custom_action.info and custom_action.module and then paste the code snippet visible at the URL above into custom_action.module.

After enabling the custom module, then go to admin->site building->actions to create new actions to add/remove terms.

Finally, you will need to create a trigger for this action to actually occur. This could be done by a cron job, user votes (e.g. with with the voting actions module), a workflow transition, or whatever is relevant to your project.

#3

doc2@drupalfr.org - November 13, 2007 - 12:38

This should be useful. I'll let you know whenever I implement this. Thank you very much.

Greetings

#4

doc2@drupalfr.org - February 12, 2008 - 17:02

My needs have changed.

Yet the Node Auto Term module could have done what I was looking for: http://drupal.org/project/nat

Hope this helps

#5

paulnem - February 27, 2008 - 00:50

Great, this plus the php code in the supplied link are just what I was looking for. I'm incorporating this with the scheduled actions module and am happy with the results so far.

#6

crandell - March 3, 2008 - 05:00

I can't get this to work quite right. The php code in the link above simply *adds* a term, even if the vocabulary is not supposed to allow multiple selections. How do I get it to *change* the term instead? So it would clear all other terms in the vocabulary before adding the desired term? I'm not well-versed in php.

#7

doc2@drupalfr.org - March 3, 2008 - 12:34

Crandell, your request is about a new feature and should be submitted as such as a new issue, or as a forum topic.

Then you could link it there. Personaly, I cannot help you on this unfortunately. Good luck.

 
 

Drupal is a registered trademark of Dries Buytaert.