You are here

feeds_imagegrabber.install in Feeds Image Grabber 7

Same filename and directory in other branches
  1. 6 feeds_imagegrabber.install

Schema definitions install/update/uninstall hooks.

File

feeds_imagegrabber.install
View source
<?php

// $Id$

/**
 * @file
 * Schema definitions install/update/uninstall hooks.
 */

/**
 * Implements hook_schema().
 */
function feeds_imagegrabber_schema() {
  $schema['feeds_imagegrabber'] = array(
    'description' => 'stores the settings of feeds image grabber per feed node',
    'fields' => array(
      'feed_nid' => array(
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
        'description' => 'The feed nid for which the feeds image grabber is enabled',
      ),
      'enabled' => array(
        'description' => 'Current enabled status for this feed nid',
        'type' => 'int',
        'not null' => TRUE,
        'default' => 0,
        'unsigned' => TRUE,
      ),
      'id_class' => array(
        'description' => 'Identifying tag attribute an ID (1) or Class(2) or nothing (0)?',
        'type' => 'int',
        'not null' => TRUE,
        'default' => 0,
        'unsigned' => TRUE,
      ),
      'id_class_desc' => array(
        'description' => 'Identifying tag attribute value.',
        'type' => 'varchar',
        'length' => '128',
      ),
      'feeling_lucky' => array(
        'description' => 'Get the first image from between the tags or not',
        'type' => 'int',
        'not null' => TRUE,
        'default' => 0,
        'unsigned' => TRUE,
      ),
      'exec_time' => array(
        'description' => 'Percentage of PHP maximum execution time to utilize for grabbing image for each feed item.',
        'type' => 'int',
        'not null' => TRUE,
        'default' => 10,
        'unsigned' => TRUE,
      ),
    ),
    'primary key' => array(
      'feed_nid',
    ),
  );
  return $schema;
}

/**
 * Implements hook_uninstall().
 */
function feeds_imagegrabber_uninstall() {
  variable_del('feeds_imagegrabber');
}

Functions