You are here

function image_fupload_install in Image FUpload 6.3

Same name and namespace in other branches
  1. 6 image_fupload.install \image_fupload_install()
  2. 6.2 image_fupload.install \image_fupload_install()

Implementation of hook_install().

File

./image_fupload.install, line 10

Code

function image_fupload_install() {

  // install a default preview preset for image module so that it works when it is activated
  // also preventing 403 errors)
  $image_node_types = variable_get('image_node_types', array());
  if (empty($image_node_types['image'])) {
    $image_node_types['image'] = array(
      'title' => 'Image',
      'fieldname' => 'images',
      'image_selection' => 'preview',
      // best choice I think; can be changed in admin menu
      'imagecache_preset' => '',
    );
    variable_set('image_node_types', $image_node_types);
  }

  // create table for temporary images for image preview list
  drupal_install_schema('image_fupload');
}