-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathos2web.profile
More file actions
67 lines (56 loc) · 1.74 KB
/
os2web.profile
File metadata and controls
67 lines (56 loc) · 1.74 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
<?php
/**
* @file
* This file includes all hooks to proper set up profile during install
*/
/**
* Name of profile; visible in profile selection form.
*/
define('PROFILE_NAME', 'OS2Web Turnkey');
/**
* Description of profile; visible in profile selection form.
*/
define('PROFILE_DESCRIPTION', 'Generisk Installation af OS2Web.');
/**
* Implements hook_install_tasks().
*/
function os2web_install_tasks() {
$task = array(
// 'os2web_import_database' => array(
// 'type' => 'normal',
// 'display_name' => st('Import default database'),
// ),
// 'os2web_profile_prepare' => array(
// 'type' => 'normal',
// 'display_name' => st('Prepare OS2web..'),
// ),
// 'os2web_settings_form' => array(
// 'display_name' => st('Setup OS2Web'),
// 'type' => 'form',
// ),
);
return $task;
}
/**
* Implements hook_profile_prepare().
*/
function os2web_profile_prepare() {
drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
// Menu rebuild neccesary to load xpath_parser
menu_rebuild();
drupal_set_message('Database import complete, please reload this form to continue.', 'ok');
}
/**
* Implements hook_form_FORM_ID_alter().
*
* Allows the profile to alter the site configuration form.
*/
function os2web_form_install_configure_form_alter(&$form, $form_state) {
// Pre-populate the site name with the server name.
$form['site_information']['site_name']['#default_value'] = 'OS2Web';
$form['update_notifications']['update_status_module']['#default_value'] = array(0, 0);
$form['server_settings']['site_default_country']['#default_value'] = 'DK';
$form['server_settings']['#access'] = FALSE;
$form['update_notifications']['#access'] = FALSE;
$form['admin_account']['account']['name']['#default_value'] = 'admin';
}