You are here

contentoptimizer.install in Content Optimizer 6

File

contentoptimizer.install
View source
<?php

/**
 *  Implementation of hook_install().
 */
function contentoptimizer_install() {
  drupal_install_schema('contentoptimizer');
  drupal_set_message(t('Content Optimizer has been installed.'));
}

/**
 * Implementation of hook_uninstall().
 */
function contentoptimizer_uninstall() {
  drupal_uninstall_schema('contentoptimizer');
  drupal_set_message(t('Content Optimizer has been uninstalled.'));
}

/**
 *  Implementation of hook_schema
 */
function contentoptimizer_schema() {
  $schema['contentoptimizer_keyword'] = array(
    'description' => t('Creates database table for contentoptimizer keywords.'),
    'fields' => array(
      'nid' => array(
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
        'description' => t('The {node}.nid to which the contentoptimizer keyword.'),
      ),
      //nid
      'keyword' => array(
        'type' => 'varchar',
        'length' => '128',
        'not null' => TRUE,
        'default' => '',
        'description' => t('The targeted keyword phrase for the node.'),
      ),
      //title
      'modifiers' => array(
        'type' => 'varchar',
        'length' => '255',
        'not null' => TRUE,
        'default' => '',
        'description' => t('Modifiers for targeted keyword phrase.'),
      ),
    ),
  );
  return $schema;
}

Functions

Namesort descending Description
contentoptimizer_install Implementation of hook_install().
contentoptimizer_schema Implementation of hook_schema
contentoptimizer_uninstall Implementation of hook_uninstall().