You are here

function photos_install in Album Photos 6.2

Same name and namespace in other branches
  1. 8.5 photos.install \photos_install()
  2. 8.4 photos.install \photos_install()
  3. 7.3 photos.install \photos_install()
  4. 6.0.x photos.install \photos_install()

File

./photos.install, line 164

Code

function photos_install() {
  drupal_install_schema('photos');
  $size = array(
    array(
      'name' => 'thumb',
      'w' => 100,
      'h' => 75,
      'r' => 'scale_and_crop',
    ),
    array(
      'name' => '240x180',
      'w' => 240,
      'h' => 180,
      'r' => 'scale',
    ),
    array(
      'name' => '640x480',
      'w' => 640,
      'h' => 480,
      'r' => 'scale',
    ),
  );
  variable_set('photos_title_0', $size[0]['name']);
  variable_set('photos_title_1', $size[1]['name']);
  variable_set('photos_title_2', $size[2]['name']);
  variable_set('photos_size', $size);
  variable_set('photos_display_list_imagesize', $size[1]['name']);
  variable_set('photos_display_view_imagesize', $size[2]['name']);
  db_query("INSERT INTO {x_count} (cid, changed, type, value) VALUES (0, %d, '%s', 0), (0, %d, '%s', 0)", time(), 'site_album', time(), 'site_image');
}