dynamic_background_blog.install in Dynamic Background 7
Same filename and directory in other branches
Installes the database scheme and handles install and uninstall of the module.
File
modules/dynamic_background_blog/dynamic_background_blog.installView source
<?php
/**
* @file
* Installes the database scheme and handles install and uninstall of the
* module.
*/
/**
* Implementation of hook_schema(), which implementes the table
* dynamic_background_node that holds information about about the pr. node
* selected image.
*
* @return array $schema
*/
function dynamic_background_blog_schema() {
$schema = array();
$schema['dynamic_background_blog'] = array(
'description' => t(''),
'fields' => array(
'uid' => array(
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
),
'image_id' => array(
'type' => 'text',
'not null' => TRUE,
),
),
'primary key' => array(
'uid',
),
'indexes' => array(
'uid' => array(
'uid',
),
),
);
return $schema;
}
/**
* Implementation of hook_install().
*/
function dynamic_background_blog_install() {
}
/**
* Implementation of hook_uninstall():
*/
function dynamic_background_blog_uninstall() {
// Remove database table.
drupal_uninstall_schema('dynamic_background_blog');
// Remove settings.
variable_del('dynamic_background_blog_css');
variable_del('dynamic_background_blog_image_style');
}
Functions
Name | Description |
---|---|
dynamic_background_blog_install | Implementation of hook_install(). |
dynamic_background_blog_schema | Implementation of hook_schema(), which implementes the table dynamic_background_node that holds information about about the pr. node selected image. |
dynamic_background_blog_uninstall | Implementation of hook_uninstall(): |