Project

General

Profile

Download (6.52 KB) Statistics
| Branch: | Tag: | Revision:
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
      'toggle_node_info_cdm_media' => false,
69
      'toggle_node_info_cdm_name' => false,
70
      'toggle_node_info_cdm_taxon' => false,
71
      'toggle_node_info_cdm_reference' => false
72
    ));
73
    variable_set('cdm_webservice_debug', 0);
74
    variable_set('cdm_webservice_cache', 0);
75
    variable_set('distribution_sort', 'HIDE_TDWG2');
76
    
77

    
78
/************************************************************
79
*                            ROLES                          *
80
************************************************************/
81
    $role_id['anonymous user'] = 1;
82
    $role_id['authenticated user'] = 2;
83

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

    
108
/************************************************************
109
*                   USERS <=> ROLES MAPPING                 *
110
************************************************************/
111

    
112
/************************************************************
113
*                       EXPORTING NODES                     *
114
************************************************************/
115
    // exporting nodes of type: Page
116
    db_query(
117
        "INSERT INTO {node} (nid,vid,type,title,uid,status,created,changed,comment,promote,moderate,sticky)
118
        VALUES ('%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s')",
119
        '1','1','page','CDM DataPortal','1','1','1285672677','1285673272','0','0','0','0'
120
    );
121
    db_query(
122
        "INSERT INTO {node_revisions} (nid,vid,uid,title,body,teaser,log,timestamp,format)
123
        VALUES ('%s','%s','%s','%s','%s','%s','%s','%s','%s')",
124
        '1','1','1','CDM DataPortal','<h3>Welcome to your CDM DataPortal. </h3>
125
    
126
    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.
127
    
128
    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>
129
    
130
    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.
131
    
132
    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'
133
    );
134

    
135
    system_initialize_theme_blocks('garland');
136
    
137
    // set site info
138
    //  * site name
139
    //  * start page
140
    db_query(
141
        "REPLACE INTO {variable} (name, value) VALUES
142
          ('cdm_dataportal_geoservice_display_width', 's:3:\"600\";'),
143
          ('site_frontpage', 's:6:\"node/1\";'),
144
          ('site_name', 's:9:\"TDWG 2010\";')
145
        ");
146
        
147
   // FIX node sequences !!!!!
148
   
149
    db_query(
150
        "REPLACE INTO {sequences} (name, id) VALUES
151
        ('{node_nid}', 1),
152
        ('{node_revisions_vid}', 1);
153
        ");
154
	
155
    return;
156
}
157

    
158
?>
    (1-1/1)