function cms_blog_install in Glazed CMS Blog 7
Same name and namespace in other branches
- 8 cms_blog.install \cms_blog_install()
Implements hook_install().
File
- ./
cms_blog.install, line 12 - Install, update and uninstall functions for the CMS Blog module.
Code
function cms_blog_install() {
// Enable some standard blocks.
$default_theme = variable_get('theme_default', 'bartik');
$blocks = array(
array(
'cache' => '-1',
'delta' => 'cms_blog-blog_authors',
'module' => 'views',
'pages' => "blog\nblog/*\ntags/*",
'region' => 'sidebar_second',
'status' => '1',
'theme' => $default_theme,
'visibility' => '1',
'weight' => '0',
),
array(
'cache' => -'1',
'delta' => '2',
'module' => 'tagclouds',
'pages' => "blog\nblog/*\ntags/*",
'region' => 'sidebar_second',
'status' => '1',
'theme' => $default_theme,
'visibility' => '1',
'weight' => '1',
),
array(
'cache' => '-1',
'delta' => 'cms_blog_cat-blog_categories',
'module' => 'views',
'pages' => "blog\nblog/*\ntags/*",
'region' => 'sidebar_second',
'status' => '1',
'theme' => $default_theme,
'visibility' => '1',
'weight' => '2',
),
);
foreach ($blocks as $block) {
db_merge('block')
->key(array(
'module' => $block['module'],
'delta' => $block['delta'],
'theme' => $default_theme,
))
->fields($block)
->execute();
}
module_enable(array(
'comment',
));
}