Add related terms & synonym editing

jmiccolis - May 30, 2007 - 18:58
Project:Node Auto Term [NAT]
Version:HEAD
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:closed
Description

The attached patch adds synonym and related term editing to nat enabled terms. There is a setting to enable this, and once enabled the extra fields are added to the appropriate node editing screens.

Additionally this patch adds a warning when editing terms that are NAT managed.

AttachmentSize
nat_related_synonym.patch6.3 KB

#1

Zen - May 30, 2007 - 20:21
Component:User interface» Code
Status:needs review» needs work

Looks useful, thanks.

Please:

  1. run this through the coder module to clean up code style issues.
  2. clean up a few white-space and indentation issues.
  3. fix variable names $node_arr -> $node_array.
  4. capitalise comments and terminate with a period.
  5. remove the warning. I will very likely be enabling an optional two-way control between nodes and terms. Perhaps this can be a configuration option. Alternatively, it would be ideal if we can implement proper access control to these vocabularies.
  6. check hook_nodeapi: the related terms and synonyms don't seem to get passed successfully during node creation. Works fine during node updates.
  7. try to avoid the array casts in hook_nodeapi as they look unnecessary and very expensive. You could perhaps replace it with $a->$b, where $b is a string.
  8. bunch the two form variables together using a #tree => TRUE.

Thanks mate.
-K

#2

jmiccolis - June 4, 2007 - 21:15

Attached is a new patch with all the changes you mentioned above.

AttachmentSize
nat_related_synonym_2.patch 5.61 KB

#3

jmiccolis - June 5, 2007 - 21:58
Status:needs work» needs review

Forgot to change the status :)

#4

Zen - June 21, 2007 - 20:16
Status:needs review» fixed

Committed to D5 and HEAD along with a couple of tweaks and fixes. Thanks Jeff :)

-K

#5

Anonymous - July 5, 2007 - 20:27
Status:fixed» closed
 
 

Drupal is a registered trademark of Dries Buytaert.