function filedepot_install_cck_filefield in filedepot 6
1 call to filedepot_install_cck_filefield()
File
- ./
ccknodedef.inc, line 130 - ccknodedef.inc CCK Import logic that is only called after install once - when creating the first folder (node) Need to extend the Content Type definition as defined by filedepot__node_info() to include the CCK filefield file. Not able to do so in the…
Code
function filedepot_install_cck_filefield() {
// CCK content_copy.module may not be enabled, so make sure it is included
require_once './' . drupal_get_path('module', 'content') . '/modules/content_copy/content_copy.module';
/* get the CCK node types to be created. This is where you load the
* file containing your function from above, if necessary, and then call
* that function.
*/
$content = _filedepot_cck_export();
$form_state['values']['type_name'] = 'filedepot_folder';
$form_state['values']['macro'] = '$content = ' . var_export($content, TRUE) . ';';
// form provided by content_copy.module
drupal_execute('content_copy_import_form', $form_state);
content_clear_type_cache();
watchdog('filedepot', 'Completed adding CCK filefield to the Folder Content Type');
}