You are here

function _node_gallery_install_default in Node Gallery 6

Same name and namespace in other branches
  1. 6.2 node_gallery.install \_node_gallery_install_default()
1 call to _node_gallery_install_default()
node_gallery_install in ./node_gallery.install
Implementation of hook_install()

File

./node_gallery.install, line 160
Node gallery install file.

Code

function _node_gallery_install_default() {

  /* Set the defaults for a node_gallery relationship */
  $default->name = 'Default Node Gallery';
  $default->gallery_type = 'node_gallery_gallery';
  $default->image_type = 'node_gallery_image';
  $default->data = array(
    'display_fields' => array(
      'title' => 'title',
      'body_field' => 'body_field',
    ),
    'gallery_directory' => '',
    'default_cover' => '',
    'image_size' => array(
      'cover' => 'node-gallery-cover',
      'thumbnail' => 'node-gallery-thumbnail',
      'preview' => 'node-gallery-display',
    ),
    'teaser' => array(
      'gallery_display_type' => 'cover',
      'thumbnails_num' => '',
      'image' => 'node-gallery-display',
      'lightbox2_gallery' => '',
    ),
    'gallery' => array(
      'gallery_display' => 'thumbnails',
      'lightbox2_gallery_preset' => 'node-gallery-display',
      'image' => 'node-gallery-thumbnail',
    ),
    'view_original' => '0',
    'view_original_text' => '',
    'lightbox2' => 'node-gallery-display',
    'content_display' => 'image',
    'image_comment' => '2',
    'upload_settings' => array(
      'number_uploads' => '5',
    ),
  );
  $default->data = serialize($default->data);
  $sql = "INSERT INTO {ng_gallery_config} VALUES ('%s', '%s', '%s', '%s')";
  db_query($sql, $default->name, $default->gallery_type, $default->image_type, $default->data);
}