-
Notifications
You must be signed in to change notification settings - Fork 1
/
feature_server.profile
84 lines (70 loc) · 2.39 KB
/
feature_server.profile
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
<?php
/**
* Return a description of the profile for the initial installation screen.
*
* @return
* An array with keys 'name' and 'description' describing this profile.
*/
function feature_server_profile_details() {
return array(
'name' => 'Feature Server',
'description' => 'Select this profile to deploy a feature server.'
);
}
/**
* Return an array of the modules to be enabled when this profile is installed.
*
* @return
* An array of modules to be enabled.
*/
function feature_server_profile_modules() {
return array(
/* optional core */
'color', 'comment', 'dblog', 'help', 'menu', 'taxonomy',
/* other contrib */
'content', 'context', 'ctools', 'features', 'filefield', 'fserver', 'install_profile_api', 'nodereference', 'nodereference_url', 'number', 'optionwidgets', 'strongarm', 'text', 'views',
);
}
/**
* Implementation of hook_profile_tasks().
*/
function feature_server_profile_tasks() {
// Install the core required modules and our extra modules
$core_required = array('block', 'filter', 'node', 'system', 'user');
install_include(array_merge(feature_server_profile_modules(), $core_required));
// Make a 'maintainer' role
install_add_role('maintainer');
$rid = install_get_rid('maintainer');
// Set some permissions for the role
$perms = array(
'access content',
'create fserver_project content',
'create fserver_release content',
'edit own fserver_project content',
'edit own fserver_release content',
'delete own fserver_project content',
'delete own fserver_release content',
'access comments',
'post comments without approval',
);
install_add_permissions($rid, $perms);
// Change anonymous user's permissions - since anonymous user is always rid 1 we don't need to retrieve it
$perms = array(
'access content',
'access comments',
'post comments',
);
install_add_permissions(1, $perms);
// Enable the Tao subtheme
install_enable_theme("tao");
// Enable default theme
install_default_theme("singular");
// Put the navigation block in the sidebar because the sidebar looks awesome.
install_init_blocks();
// Recent comments
install_set_block('user', 1, 'singular', 'right');
// call rebuild - this makes the cck fields 'associate' to their node types properly
features_rebuild();
// Set the front page to be fserver
variable_set('site_frontpage', 'fserver');
}