Using just hook_form_alter, getting rid of hook_nodeapi

Eric_A - May 29, 2009 - 13:48
Project:Override Node Options
Version:5.x-1.1
Component:Code
Category:task
Priority:normal
Assigned:Unassigned
Status:active
Description

Yesterday I found this project, but got frightened by some pending issues and the fact that the modules uses hook_nodeapi and throws away the original options fieldset.

Then I coded a basic 5.x node options access module and achieved this by using just hook_form_alter (and hook_perm). It alters (or sets) the #access properties of the exisitng options fieldset and the involved children (status, promote, sticky, revision).

I suppose that the fact that Override Node Options uses hook_nodeapi() and it's own form elements in a new options fieldset introduces quite some complexity, which one like to get rid of if possible.

If your interested, please let me know. If I'm overlooking something, please let me know, too :-)

 
 

Drupal is a registered trademark of Dries Buytaert.