recently_read.install in Recently Read 7
Same filename and directory in other branches
Recently read installation file. Displays a history of recently read nodes by currently logged in user.
File
recently_read.installView source
<?php
/**
* @file
* Recently read installation file.
* Displays a history of recently read nodes by currently logged in user.
*/
/**
* Implements hook_schema().
*/
function recently_read_schema() {
$schema['recently_read_nodes'] = array(
'description' => 'Table for history of read nodes',
'fields' => array(
'nid' => array(
'description' => 'The {node}.nid of the read node.',
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
),
'type' => array(
'description' => 'The type of the read node.',
'type' => 'varchar',
'length' => 32,
'not null' => TRUE,
'default' => '',
),
'uid' => array(
'description' => 'The {user}.uid that read the node.',
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
),
'timestamp' => array(
'description' => 'The time the node has been read.',
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
),
),
'primary key' => array(
'nid',
'uid',
),
);
return $schema;
}
/**
* Implements hook_uninstall().
*/
function recently_read_uninstall() {
variable_del('recently_read_node_types');
variable_del('recently_read_max_entries');
variable_del('recently_read_max_length');
variable_del('recently_read_node_types');
variable_del('recently_read_anonymous_enabled');
}
Functions
Name | Description |
---|---|
recently_read_schema | Implements hook_schema(). |
recently_read_uninstall | Implements hook_uninstall(). |