Project:Node Auto Term [NAT]
Version:master
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

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

Comments

#1

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

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

AttachmentSize
nat_related_synonym_2.patch 5.61 KB

#3

Status:needs work» needs review

Forgot to change the status :)

#4

Status:needs review» fixed

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

-K

#5

Status:fixed» closed (fixed)