wordstream.install in WordStream Keyword Tools 7
Same filename and directory in other branches
Install file.
File
wordstream.installView source
<?php
/**
* @file
* Install file.
*/
/**
* Implements hook_install().
().
*/
function wordstream_install() {
// TODO The drupal_(un)install_schema functions are called automatically in D7.
// drupal_install_schema('wordstream')
drupal_set_message(t('WordStream has been installed.'));
// if (!variable_get('scribeseo_apikey', '')) {
// drupal_set_message(t('Your Scribe API Key is Empty. Please ') . l(t('configure the Scribe Content Optimizer plugin.'), 'admin/config/scribeseo'), 'error');
//}
}
/**
* Implements hook_uninstall().
().
*/
function wordstream_uninstall() {
// TODO The drupal_(un)install_schema functions are called automatically in D7.
// drupal_uninstall_schema('wordstream')
drupal_set_message(t('WordStream has been uninstalled.'));
}
/**
* Implements hook_schema
().
*/
function wordstream_schema() {
$schema['wordstream_cache'] = array(
'description' => 'Creates database table to store wordstream data.',
'fields' => array(
'keyphrase' => array(
'type' => 'varchar',
'length' => '255',
'not null' => TRUE,
'default' => '',
'description' => 'target keyphrase.',
),
//keyphrase
'adult_filter' => array(
'type' => 'int',
'size' => 'tiny',
'not null' => TRUE,
'default' => 1,
'description' => 'timestamp of last data update',
),
//adult_filter
'api_call' => array(
'type' => 'varchar',
'length' => '64',
'not null' => TRUE,
'default' => '',
'description' => 'API call',
),
//function
'updated' => array(
'type' => 'int',
'unsigned' => TRUE,
'not null' => FALSE,
'description' => 'timestamp of last data update',
),
//stats_update
'data' => array(
'type' => 'text',
'description' => 'result from api call',
),
),
'primary key' => array(
'keyphrase',
'adult_filter',
'api_call',
),
);
return $schema;
}
Functions
Name![]() |
Description |
---|---|
wordstream_install | Implements hook_install(). (). |
wordstream_schema | Implements hook_schema (). |
wordstream_uninstall | Implements hook_uninstall(). (). |