Calling all Drupal developers!
Help us get this on the first page of Digg. DIGG NOW!
Help us get this on the first page of Digg. DIGG NOW!
1.1.2.16 (checked in on 2008/09/01 at 13:19:02 by karens)
Adds capability to import/export cck field data definitions.
Emulates the import/export process introduced in Views to export the field settings arrays as text them copy and paste text to import the field settings back into another content type.
Functions to create and playback macros borrowed from moshe weitzman's macro module. Macros created using drupal_execute() on the field settings form for each of the requested forms. Multi-part forms built using examples from Jeff Eaton's example at http://jeff.viapositiva.net/drupal/dynamic-forms.
You can export one or two fields and/or groups from one content type and import them into another content type in the same or a different installation, or export a complete content type with all groups and fields and create it as an exact copy in another installation.
Content type, group and field names will be imported exactly as exported. If the names are already in use, no import will be performed.
Note: The "display fields" information is being handled a little differently than the rest of the data that's imported and exported. Instead of calling through the create and playback macros, we get and set the data directly from/into the database. the reason for this is that the playback macro method does not lend itself well to the display fields.
| Name | Description |
|---|---|
| content_copy_export | Process the export, get field admin forms for all requested fields and save the form values as formatted text. |
| content_copy_export_form | A form to export field definitions. |
| content_copy_fields | Get all the fields for a content type. |
| content_copy_form_alter | Implementation of hook_form_alter(). Intervene to run form through macro when doing export |
| content_copy_get_macro | |
| content_copy_groups | Get all the groups for a content type. |
| content_copy_import_form | A form to import formatted text created with export. |
| content_copy_import_form_submit | Submit handler for import form. For each submitted field: 1) add new field to the database 2) execute the imported field macro to update the settings to the imported values |
| content_copy_menu | Implementation of hook_menu(). |
| content_copy_record_macro | A handler that stores the form submissions into a $GLOBALS array |
| content_copy_types | Get all content types. |