Using just hook_form_alter, getting rid of hook_nodeapi
| Project: | Override Node Options |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | task |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Jump to:
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 :-)

#1
Sounds interesting!
My hunch is that we do it this way because core checks for the normal permissions and would reject and attempt to do something different, but I've only just come on board as co-maintainer so really I've no idea.
Post your code and let's give it a spin!
(setting the version to 6 though, as that's where we'll try it first)