? imagefield_assist.patch
Index: imagefield_assist.install
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/imagefield_assist/imagefield_assist.install,v
retrieving revision 1.1.2.1
diff -u -p -r1.1.2.1 imagefield_assist.install
--- imagefield_assist.install	28 Jul 2009 05:56:45 -0000	1.1.2.1
+++ imagefield_assist.install	18 Aug 2009 10:15:20 -0000
@@ -10,6 +10,174 @@
  */
 function imagefield_assist_install() {
   
+  // Make sure Content Copy is installed
+  // and available for the next step.
+  module_load_install('content_copy');
+  
+  // Imagefield Assist wants this specific type
+  // to save uploaded images to.
+  $content['type']  = array (
+  'name' => 'ImageField Assist Upload',
+  'type' => 'ifa_upload',
+  'description' => 'Default ImageField Assist stock for uploaded images',
+  'simpleviews_type' => false,
+  'simpleviews_type_previous' => false,
+  'title_label' => 'Título',
+  'body_label' => '',
+  'min_word_count' => '0',
+  'help' => '',
+  'node_options' => 
+  array (
+    'status' => false,
+    'promote' => false,
+    'sticky' => false,
+    'revision' => false,
+  ),
+  'old_type' => 'ifa_upload',
+  'orig_type' => '',
+  'module' => 'node',
+  'custom' => '1',
+  'modified' => '1',
+  'locked' => '0',
+  'comment' => '0',
+  'comment_default_mode' => '4',
+  'comment_default_order' => '1',
+  'comment_default_per_page' => '50',
+  'comment_controls' => '3',
+  'comment_anonymous' => 0,
+  'comment_subject_field' => '1',
+  'comment_preview' => '1',
+  'comment_form_location' => '0',
+  'fivestar' => 0,
+  'fivestar_stars' => 5,
+  'fivestar_labels_enable' => 1,
+  'fivestar_label_0' => 'Cancel rating',
+  'fivestar_label_1' => 'Poor',
+  'fivestar_label_2' => 'Okay',
+  'fivestar_label_3' => 'Good',
+  'fivestar_label_4' => 'Great',
+  'fivestar_label_5' => 'Awesome',
+  'fivestar_label_6' => 'Give it @star/@count',
+  'fivestar_label_7' => 'Give it @star/@count',
+  'fivestar_label_8' => 'Give it @star/@count',
+  'fivestar_label_9' => 'Give it @star/@count',
+  'fivestar_label_10' => 'Give it @star/@count',
+  'fivestar_style' => 'average',
+  'fivestar_text' => 'dual',
+  'fivestar_title' => 1,
+  'fivestar_feedback' => 1,
+  'fivestar_unvote' => 0,
+  'fivestar_position_teaser' => 'hidden',
+  'fivestar_position' => 'below',
+);
+$content['fields']  = array (
+  0 => 
+  array (
+    'label' => 'Image',
+    'field_name' => 'field_ifa_upload',
+    'type' => 'filefield',
+    'widget_type' => 'imagefield_widget',
+    'change' => 'Change basic information',
+    'weight' => '-1',
+    'file_extensions' => 'jpg gif png',
+    'progress_indicator' => 'bar',
+    'file_path' => 'ifa_upload',
+    'max_filesize_per_file' => '',
+    'max_filesize_per_node' => '',
+    'max_resolution' => '640x480',
+    'min_resolution' => 0,
+    'custom_alt' => 1,
+    'alt' => '',
+    'custom_title' => 1,
+    'title_type' => 'textfield',
+    'title' => '',
+    'use_default_image' => 0,
+    'default_image_upload' => '',
+    'default_image' => NULL,
+    'description' => '',
+    'filefield_insert' => false,
+    'filefield_insert_presets' => 
+    array (
+      'ifa_crop_100_75' => false,
+      'ifa_200' => false,
+      'ifa_thumbnail' => false,
+      'large' => false,
+      'medium' => false,
+      'small' => false,
+      'thumbnail' => false,
+    ),
+    'filefield_insert_width' => '',
+    'required' => 1,
+    'multiple' => '0',
+    'list_field' => '0',
+    'list_default' => 1,
+    'description_field' => '1',
+    'op' => 'Save field settings',
+    'module' => 'filefield',
+    'widget_module' => 'imagefield',
+    'columns' => 
+    array (
+      'fid' => 
+      array (
+        'type' => 'int',
+        'not null' => false,
+        'views' => true,
+      ),
+      'list' => 
+      array (
+        'type' => 'int',
+        'size' => 'tiny',
+        'not null' => false,
+        'views' => true,
+      ),
+      'data' => 
+      array (
+        'type' => 'text',
+        'serialize' => true,
+        'views' => true,
+      ),
+    ),
+    'display_settings' => 
+    array (
+      'label' => 
+      array (
+        'format' => 'above',
+        'exclude' => 0,
+      ),
+      'teaser' => 
+      array (
+        'format' => 'image_plain',
+        'exclude' => 0,
+      ),
+      'full' => 
+      array (
+        'format' => 'image_plain',
+        'exclude' => 0,
+      ),
+      4 => 
+      array (
+        'format' => 'image_plain',
+        'exclude' => 0,
+      ),
+    ),
+  ),
+);
+$content['extra']  = array (
+  'title' => '-5',
+  'menu' => '-2',
+);
+
+
+  // Make up a $form_state value.
+  $content_type = array(
+    'values' => array(
+      'type_name' => '<create>',
+      'macro' => '$content = '. var_export($content, true) .';',
+    ),
+  );
+  // Run it.
+  drupal_execute('content_copy_import_form', $content_type);
+    
 }
 
 
@@ -53,4 +221,3 @@ function imagefield_assist_update_6200()
   }
   return $ret;
 }
-
Index: imagefield_assist.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/imagefield_assist/imagefield_assist.module,v
retrieving revision 1.1.2.4
diff -u -p -r1.1.2.4 imagefield_assist.module
--- imagefield_assist.module	6 Aug 2009 20:09:59 -0000	1.1.2.4
+++ imagefield_assist.module	18 Aug 2009 10:15:21 -0000
@@ -1458,6 +1458,9 @@ function imagefield_assist_map_delete($n
  */
 function imagefield_assist_map_load($nid) {
   $imagemap = array();
+  if (!db_table_exists('image')) {
+    return $imagemap;
+  }
   $result = db_query('SELECT * FROM {image} i INNER JOIN {imagefield_assist_map} iam ON i.nid = iam.iid WHERE i.nid = %d', $nid);
   while ($data = db_fetch_object($result)) {
     $imagemap[] = $data->nid;
