hook_approve, typed approval and some other things

_Daniel - September 22, 2008 - 08:19
Project:Node approval
Version:5.x-1.x-dev
Component:Miscellaneous
Category:feature request
Priority:normal
Assigned:Unassigned
Status:active
Description

* There should be some API for other modules to react on approvals (a custom hook maybe). Doing node_invoke_nodeapi(node_load($nid), 'update') is to rough, cause modules don't know what really happened (only a little update happened, and may be even it's not necessary to call node_load). In addition, there should be an option whether on not update node.status after approval, because if some module responds to a hook, it is the module responsibility to do anything on approval (publish/unpublish/whatever).

* It would be convenient to make "approve" and "disapprove" links near each node in the table.

* Theme function for the individual node table row would be great.

* Please, don't rely on CURRENT_TIMESTAMP, use time(). And by the way the nodeapproval.time field is not updated in nodeapproval_do_approval(). And nodeapproval.uid should be removed (there's a node.uid).

* Maybe it's beyond the scope of this module, but with a little of work to support typed node approval (by the new nodeapproval.type field), a lot of complex usage scenarios can be done. For example a workflow, where several editors must approve the node before publication (in that case type = editor's name). A type can distinguish between various approval scenarios, for example "community approval" vs "administrator approval".

#1

_Daniel - September 22, 2008 - 08:49

* hook_uninstall should be made

 
 

Drupal is a registered trademark of Dries Buytaert.