This repository has been archived by the owner on Oct 31, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
thurgood.profile
339 lines (290 loc) · 8.53 KB
/
thurgood.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
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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
<?php
// This installation profile is based on the work of Fuse Interactive.
// http://fuseinteractive.ca/blog/getting-started-drupal-install-profiles
// It also draws upon Open Atrium's profile.
function thurgood_profile_details() {
return array(
'name' => 'Thurgood',
'description' => 'Installation profile for Thurgood.',
);
}
/**
* Return an array of the modules to be enabled when this profile is installed.
*
* @return
* An array of modules to be enabled.
*/
function thurgood_profile_modules() {
return array(
// Enable required core modules first.
'block',
'filter',
'node',
'system',
'user',
// Enable optional core modules next.
// 'comment',
'contact',
'dblog',
'help',
'menu',
'path',
'search',
'taxonomy',
// The rest are contrib modules, sorted by makefile:
// admin.make
'backup_migrate',
'backup_migrate_files',
'devel',
'devel_generate',
'performance',
'googleanalytics',
'node_import',
// Installed later because it depends on Ctools.
// 'strongarm',
// basic.make
'content_profile',
'content_profile_tokens',
// Installed later because they depend on Ctools.
// 'context',
// 'context_layouts',
// 'context_ui',
'ctools',
'page_manager',
'calendar',
'calendar_multiday',
'jcalendar',
'date',
'date_api',
'date_popup',
'date_repeat',
'date_timezone',
'features',
// 'modalframe', // Installed later because it depends on Jquery.
'node_tools',
'rules',
'rules_admin',
'token',
'transliteration',
'imageapi',
'imageapi_gd',
'imagecache',
'imagecache_ui',
// cck.make
'conditional_fields',
'content',
'content_copy',
'content_taxonomy',
'content_taxonomy_autocomplete',
'content_taxonomy_options',
'content_taxonomy_tree',
'email',
'emfield',
'emvideo',
'fieldgroup',
'filefield',
'imagefield',
'link',
'media_youtube',
'media_vimeo',
'nodereference',
'noderelationships',
'number',
'office_hours',
'optionwidgets',
'phone',
// 'reverse_node_reference', // Installed later because it depends on db_version.
'text',
'userreference',
// geo.make
'openlayers',
'openlayers_cck',
'openlayers_ui',
'openlayers_views',
'openlayers_geocoder',
// interaction.make
'flag',
'flag_actions',
'flag_note',
'messaging',
'messaging_mail',
'notifications_content',
'notifications',
'notifications_rules',
'notifications_ui',
'notifications_views',
'notifications_tags',
// panels.make
'panels',
// search.make
'faceted_search',
'faceted_search_ui',
'faceted_search_views',
'field_keyword_filter',
'taxonomy_facets',
'field_indexer',
'cck_field_indexer',
'node_field_indexer',
'porterstemmer',
// seo.make
// 'nodewords_admin',
// 'nodewords_basic',
// 'nodewords',
'pathauto',
'pathauto_persist',
// 'page_title',
// 'subpath_alias',
// 'url_alter',
// 'xmlsitemap',
// ui.make
'blocks404',
'admin',
'admin_menu',
'advanced_help',
'better_formats',
'cmf',
'hierarchical_select',
'hs_content_taxonomy',
'hs_taxonomy',
'hs_taxonomy_views',
'hs_menu',
'logintoboggan',
'quicktabs',
'taxonomy_manager',
'vertical_tabs',
'vt_default',
'jquery_ui',
'jquery_ui_dialog',
'jquery_update',
// views.make
'views',
'views_customfield',
'views_export',
'views_or',
'views_rss',
'views_slideshow',
'views_slideshow_singleframe',
'views_ui',
// workflow.make
'diff',
'override_node_options',
'revisioning',
'workflow',
'workflow_access',
// (STUB) wysiwyg.make
// features.make
'thurgood_custom_module',
'thurgood_feature',
'thurgood_conf_feature',
);
}
/**
* Reimplementation of system_theme_data(). The core function's static cache
* is populated during install prior to active install profile awareness.
* This workaround makes enabling themes in profiles/[profile]/themes possible.
*/
function _thurgood_system_theme_data() {
global $profile;
$profile = 'thurgood';
$themes = drupal_system_listing('\.info$', 'themes');
$engines = drupal_system_listing('\.engine$', 'themes/engines');
$defaults = system_theme_default();
$sub_themes = array();
foreach ($themes as $key => $theme) {
$themes[$key]->info = drupal_parse_info_file($theme->filename) + $defaults;
if (!empty($themes[$key]->info['base theme'])) {
$sub_themes[] = $key;
}
$engine = $themes[$key]->info['engine'];
if (isset($engines[$engine])) {
$themes[$key]->owner = $engines[$engine]->filename;
$themes[$key]->prefix = $engines[$engine]->name;
$themes[$key]->template = TRUE;
}
// Give the stylesheets proper path information.
$pathed_stylesheets = array();
foreach ($themes[$key]->info['stylesheets'] as $media => $stylesheets) {
foreach ($stylesheets as $stylesheet) {
$pathed_stylesheets[$media][$stylesheet] = dirname($themes[$key]->filename) .'/'. $stylesheet;
}
}
$themes[$key]->info['stylesheets'] = $pathed_stylesheets;
// Give the scripts proper path information.
$scripts = array();
foreach ($themes[$key]->info['scripts'] as $script) {
$scripts[$script] = dirname($themes[$key]->filename) .'/'. $script;
}
$themes[$key]->info['scripts'] = $scripts;
// Give the screenshot proper path information.
if (!empty($themes[$key]->info['screenshot'])) {
$themes[$key]->info['screenshot'] = dirname($themes[$key]->filename) .'/'. $themes[$key]->info['screenshot'];
}
}
foreach ($sub_themes as $key) {
$themes[$key]->base_themes = system_find_base_themes($themes, $key);
// Don't proceed if there was a problem with the root base theme.
if (!current($themes[$key]->base_themes)) {
continue;
}
$base_key = key($themes[$key]->base_themes);
foreach (array_keys($themes[$key]->base_themes) as $base_theme) {
$themes[$base_theme]->sub_themes[$key] = $themes[$key]->info['name'];
}
// Copy the 'owner' and 'engine' over if the top level theme uses a
// theme engine.
if (isset($themes[$base_key]->owner)) {
if (isset($themes[$base_key]->info['engine'])) {
$themes[$key]->info['engine'] = $themes[$base_key]->info['engine'];
$themes[$key]->owner = $themes[$base_key]->owner;
$themes[$key]->prefix = $themes[$base_key]->prefix;
}
else {
$themes[$key]->prefix = $key;
}
}
}
// Extract current files from database.
system_get_files_database($themes, 'theme');
db_query("DELETE FROM {system} WHERE type = 'theme'");
foreach ($themes as $theme) {
$theme->owner = !isset($theme->owner) ? '' : $theme->owner;
db_query("INSERT INTO {system} (name, owner, info, type, filename, status, throttle, bootstrap) VALUES ('%s', '%s', '%s', '%s', '%s', %d, %d, %d)", $theme->name, $theme->owner, serialize($theme->info), 'theme', $theme->filename, isset($theme->status) ? $theme->status : 0, 0, 0);
}
}
/**
* Implementation of hook_profile_tasks().
*/
function thurgood_profile_tasks(&$task, $url) {
// First, we need to install some modules that would break the normal install hook.
module_rebuild_cache();
drupal_install_modules(array('strongarm', 'modalframe', 'reverse_node_reference', 'context', 'context_layouts', 'context_ui', 'subpath_alias', 'url_alter'));
// By now, all modules are installed.
// Other tasks are broken out into includes for readability:
set_include_path(dirname(__FILE__) . DIRECTORY_SEPARATOR . '/includes');
// Theme installation and configuring.
require("theme.inc");
// Set various site variables, options, and settings.
require("variable.inc");
// Set up content types.
require("content_type.inc");
// Set up taxonomy.
require("taxonomy.inc");
// Set up roles and permissions.
require("permission.inc");
// Users that should be created at install.
require("user.inc");
// Nodes that should be created at install.
require("node.inc");
// Menus, now that we have everything that might
// create a path already set up.
require("menu.inc");
// Set up any Blocks and Contexts.
require("block.inc");
// We're done! Clear caches again, just to be safe.
drupal_flush_all_caches();
}
function thurgood_profile_final() {
// Nothing to do here, yet!
return;
}
?>