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.

Comments

Zen’s picture

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

jmiccolis’s picture

StatusFileSize
new5.61 KB

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

jmiccolis’s picture

Status: Needs work » Needs review

Forgot to change the status :)

Zen’s picture

Status: Needs review » Fixed

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

-K

Anonymous’s picture

Status: Fixed » Closed (fixed)