Project

General

Profile

« Previous | Next » 

Revision 6335a094

Added by Andreas Kohlbecker over 13 years ago

installation profile

View differences:

.gitattributes
211 211
modules/cdm_dataportal/js/thickbox/cdm_thickbox.css -text
212 212
modules/cdm_dataportal/js/thickbox/thickbox.js -text
213 213
modules/cdm_dataportal/node_types.php -text
214
modules/cdm_dataportal/profile/CDM_DataPortal/CDM_DataPortal.profile -text
214 215
modules/cdm_dataportal/theme/cdm_dataportal.common.theme -text
215 216
modules/cdm_dataportal/theme/cdm_dataportal.descriptions.theme -text
216 217
modules/cdm_dataportal/theme/cdm_dataportal.media.theme -text
modules/cdm_dataportal/profile/CDM_DataPortal/CDM_DataPortal.profile
1
<?php
2

  
3
// vim: filetype=php
4

  
5
/************************************************************
6
*                           MODULES                         *
7
************************************************************/
8
function CDM_DataPortal_profile_modules() {
9
    return array (
10
        0 => 'admin_menu',
11
        1 => 'block',
12
        2 => 'cdm_api',
13
        3 => 'jquery_update',
14
        4 => 'taxonomy',
15
        5 => 'color',
16
        6 => 'comment',
17
        7 => 'cdm_taxontree',
18
        8 => 'filter',
19
        9 => 'help',
20
        10 => 'cdm_dataportal',
21
        11 => 'menu',
22
        12 => 'node',
23
        13 => 'profile_generator',
24
        14 => 'system',
25
        15 => 'ext_links',
26
        16 => 'user',
27
        17 => 'watchdog',
28
      );
29
}
30

  
31
/************************************************************
32
*                           DETAILS                         *
33
************************************************************/
34
function CDM_DataPortal_profile_details() {
35
    return array (
36
        'name' => 'CDM DataPortal',
37
        'description' => 'CDM DataPortal installation profile generated automatically on 28th Sep 2010 02:05pm',
38
      );
39
}
40

  
41
function CDM_DataPortal_profile_final() {
42
/************************************************************
43
*                          VARIABLES                        *
44
************************************************************/
45
    variable_set('anonymous', 'Anonymous');
46
    variable_set('comment_page', 0);
47
    variable_set('file_directory_temp', 'c:\\windows\\temp');
48
    variable_set('filter_html_1', 1);
49
    variable_set('menu_primary_menu', 2);
50
    variable_set('menu_secondary_menu', 2);
51
    variable_set('node_options_forum', array (
52
      0 => 'status',
53
    ));
54
    variable_set('node_options_page', array (
55
      0 => 'status',
56
    ));
57
    variable_set('site_footer', '');
58
    variable_set('site_frontpage', 'node/1');
59
    variable_set('site_mail', '');
60
    variable_set('site_mission', '');
61
    variable_set('site_name', 'CDM Dataportal');
62
    variable_set('site_slogan', '');
63
    system_theme_data();
64
    db_query("UPDATE {system} SET status = 1 WHERE type = 'theme' and name = '%s'", 'garland');
65
    variable_set('theme_default', 'garland');
66
    variable_set('theme_settings', array (
67
      'toggle_node_info_page' => false,
68
    ));
69

  
70
/************************************************************
71
*                            ROLES                          *
72
************************************************************/
73
    $role_id['anonymous user'] = 1;
74
    $role_id['authenticated user'] = 2;
75

  
76
/************************************************************
77
*                            USERS                          *
78
************************************************************/
79
    $user = user_save(new stdClass(), array (
80
        'name' => 'admin',
81
        'mail' => 'admin@dataportal.net',
82
        'mode' => '0',
83
        'sort' => '0',
84
        'threshold' => '0',
85
        'theme' => '',
86
        'signature' => '',
87
        'created' => '1285671981',
88
        'access' => '1285675547',
89
        'login' => '0',
90
        'status' => '1',
91
        'timezone' => '0',
92
        'language' => '',
93
        'picture' => '',
94
        'init' => 'wp5Admin@bgbm.org',
95
        'data' => 'a:0:{}',
96
      ));
97
    db_query("UPDATE {users} SET pass='%s' WHERE uid=%d", '21232f297a57a5a743894a0e4a801fc3', $user->uid);
98
    $user_id['admin'] = $user->uid;
99

  
100
/************************************************************
101
*                   USERS <=> ROLES MAPPING                 *
102
************************************************************/
103

  
104
/************************************************************
105
*                       EXPORTING NODES                     *
106
************************************************************/
107
    // exporting nodes of type: Page
108
    db_query(
109
        "INSERT INTO {node} (nid,vid,type,title,uid,status,created,changed,comment,promote,moderate,sticky)
110
        VALUES ('%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s')",
111
        '1','1','page','CDM DataPortal','1','1','1285672677','1285673272','0','0','0','0'
112
    );
113
    db_query(
114
        "INSERT INTO {node_revisions} (nid,vid,uid,title,body,teaser,log,timestamp,format)
115
        VALUES ('%s','%s','%s','%s','%s','%s','%s','%s','%s')",
116
        '1','1','1','CDM DataPortal','<h3>Welcome to your CDM DataPortal. </h3>
117
    
118
    This data portal makes full use of the Common Data Model  (CDM), a central component of the Internet Platform for Cybertaxonomy being developed by EDIT workpackage 5. All taxon pages are created as dynamic web pages from the underlying database.
119
    
120
    In order to finish the setup of your DataPortal please visit the <?php print(l(\'CDM Dataportal settings\', \'admin/settings/cdm_dataportal\')); ?>. The CDM Dataportal provides several Drupal Blocks (<i>taxon search</i>, <i>classification browser</i>, <i>external links</i>, <i>print this page</i>) which you may want to activate in the <?php print(l(\'Blocks Settings\', \'admin/build/block\')); ?>','<h3>Welcome to your CDM DataPortal. </h3>
121
    
122
    This data portal makes full use of the Common Data Model  (CDM), a central component of the Internet Platform for Cybertaxonomy being developed by EDIT workpackage 5. All taxon pages are created as dynamic web pages from the underlying database.
123
    
124
    In order to finish the setup of your DataPortal please visit the <?php print(l(\'CDM Dataportal settings\', \'admin/settings/cdm_dataportal\')); ?>. The CDM Dataportal provides several Drupal Blocks (<i>taxon search</i>, <i>classification browser</i>, <i>external links</i>, <i>print this page</i>) which you may want to activate in the <?php print(l(\'Blocks Settings\', \'admin/build/block\')); ?>','','1285673272','2'
125
    );
126

  
127
    system_initialize_theme_blocks('garland');
128
    
129
    // set site info
130
    //  * site name
131
    //  * start page
132
    db_query(
133
        "REPLACE INTO {variable} (name, value) VALUES
134
          ('cdm_dataportal_geoservice_display_width', 's:3:\"600\";'),
135
          ('site_frontpage', 's:6:\"node/1\";'),
136
          ('site_name', 's:9:\"TDWG 2010\";')
137
        ");
138
        
139
   // FIX node sequences !!!!!
140
   
141
    db_query(
142
        "REPLACE INTO {sequences} (name, id) VALUES
143
        ('{node_nid}', 1),
144
        ('{node_revisions_vid}', 1);
145
        ");
146
	
147
    return;
148
}
149

  
150
?>

Also available in: Unified diff