[development] No module-defined node types?
Gabor Hojtsy
gabor at hojtsy.hu
Thu Jan 4 20:59:30 UTC 2007
On Thu, 4 Jan 2007, Gabor Hojtsy wrote:
> On Thu, 4 Jan 2007, Morbus Iff wrote:
>> You can't do this under the "old" way, because the user is stuck using
>> only your Emotional Story node type. Sure, "new" way modules could be
>> used to expand upon Emotional Story (making them also an Event and also a
>> Case Tracker Case), but when the flexibility exists to add fields + logic
>> to /any/ node type, as opposed to shipping one, you should use it. It's
>> quite rude to think that I have to use just YOUR node type when all 900
>> of my other nodes are "Story", and now I have to abandon them and use
>> "Emotional Story" instead.
>
> This possibility is in Drupal since I work with it (at least since 2003).
> There is no "new" or "old" way. It was possible since a long time to write
> node extending modules, like scheduler for example. The sad fact that event
> and some other modules were not written this way from the start does not
> imply that they do anything new by morphing to be node extensions. Even core
> modules like taxonomy and upload build on this feature. Poll is one example
> of a core node type, which is often asked to be programmed as a node
> extension instead :)
I looked it up, because I was interested in finding this out :)
Kjartan added the nodeapi hook in version 1.185 of node.module (Sun Feb
16 14:57:35 2003 UTC). This is nearly four years ago (but of course it
was not as powerful at the start as it has grown from then on quickly).
The change Kjartan has done:
http://cvs.drupal.org/viewcvs/drupal/drupal/modules/node.module?r1=1.184&r2=1.185
Gabor
More information about the development
mailing list