All pastes #621963 Raw Edit

Untitled

public text v1 · immutable
#621963 ·published 2007-07-16 15:26 UTC
rendered paste body
<?php
include_once './includes/bootstrap.inc';
drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
include 'v.php';
require_once drupal_get_path('module', 'node') .'/content_types.inc';
require_once drupal_get_path('module', 'content') .'/content_admin.inc';
$form_values['type_name'] = '<create>';

foreach (array('content', 'fieldgroup', 'nodereference', 'number', 'optionwidgets', 'text', 'userreference') as $module) {
  require_once drupal_get_path('module', 'content') ."/$module.install";
  $function = $module .'_install';
  $function();
}

$form_values['macro'] = <<<__file_upload__
\$content[type]  = array (
  'name' => 'file upload',
  'type' => 'filestore2',
  'description' => '',
  'title_label' => 'Title',
  'body_label' => 'Body',
  'min_word_count' => '0',
  'help' => '',
  'node_options' =>
  array (
    'status' => true,
    'promote' => true,
    'sticky' => false,
    'revision' => false,
  ),
  'comment' => 2,
  'forward_display_' => '1',
  'old_type' => 'filestore2',
  'orig_type' => 'filestore2',
  'module' => 'filestore2',
  'custom' => '0',
  'modified' => '1',
  'locked' => '1',
  'reset' => 'Reset to defaults',
);
__file_upload__;
drupal_execute('content_copy_import_form', $form_values);