[development] hook_nodeapi()

Rob Barreca rob at electronicinsight.com
Wed Jan 3 01:29:51 UTC 2007


>
> I hope we don't go quite that far.  I can see all-nodes-are-CCK as a nice 
> future, but I still want to be able to provide a pre-defined node type as 
> part of my module.  Not everything should be a recipe.  
We're not heading towards recipe-city, but actually just a cleaner, more 
abstract way of defining node types and value-adder modules. Currently, 
we are almost (see http://drupal.org/node/104763) defining page and 
story in default.profile which means we could do the same for node type 
'foo' in our module's hook_enable() and then lock the type and use a 
unified hook_nodeapi() if we needed to do some extra stuff.

Rob Roy Barreca
Founder and COO
Electronic Insight Corporation
http://www.electronicinsight.com
rob at electronicinsight.com



Larry Garfield wrote:
> On Tuesday 02 January 2007 4:34 pm, Jeremy Epstein wrote:
>   
>> In Drupal 5.0, the difference between hook_insert() / hook_update()
>> and friends, and hook_nodeapi(), is smaller than ever; and there is
>> less need than ever to actually still have the former in core. With
>> the new CCK-partially-in-core features, it's likely that before long,
>> there will be no such thing as module-defined node types. There will
>> only be user-defined node types.
>>     
>
> I hope we don't go quite that far.  I can see all-nodes-are-CCK as a nice 
> future, but I still want to be able to provide a pre-defined node type as 
> part of my module.  Not everything should be a recipe.  
>
> The ideal, methinks, would be import/export/hook support for CCK the same way 
> Views has.  Then many modules simply become a pre-packaged node (user 
> editable), some pre-packaged views (user-editable), maybe a pre-packaged 
> field type if needed, and a little glue code.  
>
> That would be terrific.  Not allowing modules to define nodes at all but 
> relying on the user, that would be ugly.
>
>   
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/development/attachments/20070102/e4b9902e/attachment-0001.htm 


More information about the development mailing list