Add CCK support
reikiman - September 2, 2009 - 04:57
| Project: | RSS Remote Enclosure |
| Version: | 6.x-1.0 |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | reikiman |
| Status: | active |
Jump to:
Description
Per: #550354: CCK & FeedAPI support ... have created a similar module
Change this to store the enclosure data using CCK, and to behave as a CCK module. Also ensure there's an upgrade path to D7 for the fields support.
My CCK_enclosure module can be used as the starting point.
http://hg.davidherron.com/index.cgi/drupalv6/file/tip/sites/all/modules/...
This must convert existing encl_remote tables into the CCK storage.

#1
To report in...
I have done most of the coding regarding converting encl_remote to a CCK type. It involves pretty much gutting the module and replacing it with CCK code. That makes me a bit nervous as for better or worse encl_remote as it stands is pretty darn stable.
I'm wondering whether it's worth doing a conversion now for CCK2 or waiting a bit and doing it for D7 with the fields support.
In the meantime I just wrote a FieldAPI mapper that maps to a largely unmodified encl_remote module and it works fine and the modification is very simple. I'll write that up in the other issue but am wondering whether to change the order of work and to do the FieldAPI Mapper first.
Specifically:
For the most part the admin form isn't required. Selecting appropriate content types isn't required because encl_remote would be a CCK type, and the control of is done by adding an encl_remote content type rather than checking boxes in the admin form. This means: $form[ENCL_REMOTE_NODETYPES] goes away. Also $form[ENCL_REMOTE_WEIGHT] goes away because the weight is handled by CCK.
The ENCL_REMOTE_NODETYPES and ENCL_REMOTE_WEIGHT variables also aren't required.
All calls to _encl_remote_is_nodetype_allowed are not needed.
Most of encl_remote_nodeapi goes away because it's handled by CCK. I think only the 'rss item' operation has to stay.
The _encl_remote_encl_link function would go away and be replaced by CCK theming.
The encl_remote_form_alter function would go away because CCK handles inserting & positioning the form elements