kb at 2bits.com
Thu Jan 4 01:19:33 UTC 2007
Suggestion 4 is interesting, and seems to be a viable solution too.
The biggest disadvantage of this (which is quite obvious from looking
> at the above example) is that it will be difficult to say when a
> module should or shouldn't assume ownership of node types, and that it
> will be easy for multiple modules to all assume ownership of node
> types, which would basically render the ordering of the hooks
> redundant (since none of them choose to use 'alter').
Moreover, if event module is pointing to CCK, then who owns the node
type? CCK or event?
Suggestion 5 builds on what Karoly said, which I am summarizing below.
- move all hook_load() and friends into hook_othernodeapi($op), where $op is
- So, we have one real hook (hook_nodeapi($op)), and one callback
(of course, othernodeapi has to be something better)
This has the advantage of having only a maximum of two functions per module,
with ops of course.
One for node creation modules, and the other the regular nodeapi we know
Your suggestion (#4) has the advantage of collapsing everything in one
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the development