-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlinedepping_dk.install
109 lines (99 loc) · 2.49 KB
/
linedepping_dk.install
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
<?php
require dirname(__FILE__) . '/../minimal/minimal.install';
/**
* Implements hook_install().
*
* Perform actions to set up the site for this profile.
*/
function linedepping_dk_install() {
minimal_install();
// Setting for date api.
variable_set('date_first_day', 1);
$theme = 'simpline';
$admin_theme = 'seven';
// Enable standard theme.
db_update('system')
->fields(array('status' => 1))
->condition('type', 'theme')
->condition('name', $theme)
->execute();
// Disable bartik.
db_update('system')
->fields(array('status' => 0))
->condition('type', 'theme')
->condition('name', 'bartik')
->execute();
variable_set('theme_default', $theme);
// Enable the admin theme.
db_update('system')
->fields(array('status' => 1))
->condition('type', 'theme')
->condition('name', $admin_theme)
->execute();
variable_set('admin_theme', $admin_theme);
variable_set('node_admin_theme', '1');
// Put content and menu in regions.
$values = array(
array(
'module' => 'system',
'delta' => 'main',
'theme' => $theme,
'status' => 1,
'weight' => 0,
'region' => 'content',
'pages' => '',
'cache' => -1,
),
array(
'module' => 'system',
'delta' => 'main-menu',
'theme' => $theme,
'status' => 1,
'weight' => -10,
'region' => 'sidebar_second',
'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();
// Add text formats.
$filtered_html_format = array(
'format' => 'filtered_html',
'name' => 'Filtered HTML',
'weight' => 0,
'filters' => array(
// URL filter.
'filter_url' => array(
'weight' => 0,
'status' => 1,
),
// HTML filter.
'filter_html' => array(
'weight' => 1,
'status' => 1,
),
// Line break filter.
'filter_autop' => array(
'weight' => 2,
'status' => 1,
),
// HTML corrector filter.
'filter_htmlcorrector' => array(
'weight' => 10,
'status' => 1,
),
),
);
$filtered_html_format = (object) $filtered_html_format;
filter_format_save($filtered_html_format);
}
/**
* Enable the commerce_backoffice_content module.
*/
function linedepping_dk_update_7100() {
module_enable(array('adaptive_image'));
}