[bcc][faked-from] RE: [development] hook_foo() vs. nodeapi

Mark Fredrickson mfredrickson at ppmns.org
Sun May 7 23:39:10 UTC 2006

I've been working on the code to export/import and define module  
types for CCK.


My solution has been to simply serialize the content type object and  
then unserialize and import just as if the user were creating a new  
node type. Modules could invoke content_import_type() during  
hook_install to add their content types (by simply storing the  
serialized string in code).

It's not entirely working yet, but it is on the way.


On May 7, 2006, at 6:17 PM, Jeff Eaton wrote:
> A module that defines a new content-type would just expose a blurb of
> metadata that describes the content type in terms of fields, widgets,
> etc. If it needed special kinds of fields or widgets, it would  
> implement
> those as needed. This would be a lot like views.module, and how it
> handles custom data, custom field definitions, etc. Modules would  
> still
> be able to expose custom handling code to impose additional validation
> rules, post-processing, etc. But a world of additional possibilities
> would open up; users who need a custom field or two would be able to
> simple *add* those fields to 'blog' or 'page' using the CCK
> infrastructure. No custom code needed.

More information about the development mailing list