91 lines
2.3 KiB
Plaintext
91 lines
2.3 KiB
Plaintext
<?php
|
|
/**
|
|
* @file
|
|
* Install, update and uninstall functions for the the minimal install profile.
|
|
*/
|
|
|
|
/**
|
|
* Implements hook_install().
|
|
*
|
|
* Performs actions to set up the site for this profile.
|
|
*
|
|
* @see system_install()
|
|
*/
|
|
function minimal_install() {
|
|
// Enable Bartik theme and set it as default theme instead of Stark.
|
|
// @see system_install()
|
|
$default_theme = 'bartik';
|
|
variable_set('theme_default', $default_theme);
|
|
theme_enable(array($default_theme));
|
|
theme_disable(array('stark'));
|
|
|
|
// Enable some standard blocks.
|
|
$values = array(
|
|
array(
|
|
'module' => 'system',
|
|
'delta' => 'main',
|
|
'theme' => $default_theme,
|
|
'status' => 1,
|
|
'weight' => 0,
|
|
'region' => 'content',
|
|
'pages' => '',
|
|
'cache' => -1,
|
|
),
|
|
array(
|
|
'module' => 'user',
|
|
'delta' => 'login',
|
|
'theme' => $default_theme,
|
|
'status' => 1,
|
|
'weight' => 0,
|
|
'region' => 'sidebar_first',
|
|
'pages' => '',
|
|
'cache' => -1,
|
|
),
|
|
array(
|
|
'module' => 'system',
|
|
'delta' => 'navigation',
|
|
'theme' => $default_theme,
|
|
'status' => 1,
|
|
'weight' => 0,
|
|
'region' => 'sidebar_first',
|
|
'pages' => '',
|
|
'cache' => -1,
|
|
),
|
|
array(
|
|
'module' => 'system',
|
|
'delta' => 'management',
|
|
'theme' => $default_theme,
|
|
'status' => 1,
|
|
'weight' => 1,
|
|
'region' => 'sidebar_first',
|
|
'pages' => '',
|
|
'cache' => -1,
|
|
),
|
|
array(
|
|
'module' => 'system',
|
|
'delta' => 'help',
|
|
'theme' => $default_theme,
|
|
'status' => 1,
|
|
'weight' => 0,
|
|
'region' => 'help',
|
|
'pages' => '',
|
|
'cache' => -1,
|
|
),
|
|
);
|
|
$query = db_insert('block')->fields(array('module', 'delta', 'theme', 'status', 'weight', 'region', 'pages', 'cache'));
|
|
foreach ($values as $record) {
|
|
$query->values($record);
|
|
}
|
|
$query->execute();
|
|
|
|
// Set front page to "node".
|
|
variable_set('site_frontpage', 'node');
|
|
|
|
// Allow visitor account creation, but with administrative approval.
|
|
variable_set('user_register', USER_REGISTER_VISITORS_ADMINISTRATIVE_APPROVAL);
|
|
|
|
// Enable default permissions for system roles.
|
|
user_role_grant_permissions(DRUPAL_ANONYMOUS_RID, array('access content'));
|
|
user_role_grant_permissions(DRUPAL_AUTHENTICATED_RID, array('access content'));
|
|
}
|