/[drupal]/contributions/profiles/drupal_wiki/drupal_wiki.profile
ViewVC logotype

Contents of /contributions/profiles/drupal_wiki/drupal_wiki.profile

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.3 - (show annotations) (download) (as text)
Sat Jan 5 08:34:30 2008 UTC (22 months, 3 weeks ago) by cwgordon7
Branch: MAIN
CVS Tags: DRUPAL-5--2-0-beta1, HEAD
Branch point for: DRUPAL-5--2
Changes since 1.2: +155 -488 lines
File MIME type: text/x-php
Completely redone version for new branch. Simpler, cleaner, and works better.
1 <?php
2 // $Id$
3
4 /**
5 * Implementation of hook_profile_modules().
6 */
7 function drupal_wiki_profile_modules() {
8 return array (
9 0 => 'block',
10 1 => 'book',
11 2 => 'color',
12 3 => 'comment',
13 4 => 'diff',
14 5 => 'filter',
15 6 => 'freelinking',
16 7 => 'help',
17 8 => 'menu',
18 9 => 'node',
19 10 => 'path',
20 11 => 'token',
21 13 => 'search',
22 14 => 'statistics',
23 15 => 'system',
24 16 => 'talk',
25 17 => 'pathauto',
26 18 => 'user',
27 19 => 'watchdog',
28 20 => 'wikitools',
29 );
30 }
31
32 /**
33 * Implementation of hook_profile_details().
34 */
35 function drupal_wiki_profile_details() {
36 return array (
37 'name' => 'Drupal wiki',
38 'description' => 'Select this profile to create a wiki powered by Drupal.',
39 );
40 }
41
42 /**
43 * Implementation of hook_profile_final().
44 */
45 function drupal_wiki_profile_final() {
46 // Set various variables.
47 variable_set('anonymous', 'Anonymous');
48 variable_set('clean_url', '1');
49 variable_set('comment_book', '2');
50 variable_set('comment_page', 0);
51 variable_set('comment_talk_book', 1);
52 variable_set('filter_html_1', 1);
53 variable_set('freelinking_camelcase', 0);
54 variable_set('freelinking_nodetype', 'book');
55 variable_set('freelinking_notfound', 'no access search');
56 variable_set('freelinking_onceonly', 0);
57 variable_set('freelinking_restriction', 'none');
58 variable_set('menu_primary_menu', 2);
59 variable_set('menu_secondary_menu', 2);
60 variable_set('node_options_book', array (
61 0 => 'status',
62 1 => 'revision',
63 ));
64 variable_set('node_options_forum', array (
65 0 => 'status',
66 ));
67 variable_set('node_options_page', array (
68 0 => 'status',
69 ));
70 variable_set('pathauto_case', '1');
71 variable_set('pathauto_ignore_words', '');
72 variable_set('pathauto_indexaliases', false);
73 variable_set('pathauto_indexaliases_bulkupdate', false);
74 variable_set('pathauto_max_bulk_update', '50');
75 variable_set('pathauto_max_component_length', '100');
76 variable_set('pathauto_max_length', '100');
77 variable_set('pathauto_modulelist', array (
78 0 => 'node',
79 1 => 'taxonomy',
80 2 => 'user',
81 ));
82 variable_set('pathauto_node_book_pattern', 'wiki/[title-raw]');
83 variable_set('pathauto_node_bulkupdate', 0);
84 variable_set('pathauto_node_pattern', 'content/[title-raw]');
85 variable_set('pathauto_node_supportsfeeds', NULL);
86 variable_set('pathauto_punctuation_ampersand', '2');
87 variable_set('pathauto_punctuation_asterisk', '2');
88 variable_set('pathauto_punctuation_at', '2');
89 variable_set('pathauto_punctuation_backtick', '2');
90 variable_set('pathauto_punctuation_back_slash', '2');
91 variable_set('pathauto_punctuation_caret', '2');
92 variable_set('pathauto_punctuation_colon', '2');
93 variable_set('pathauto_punctuation_comma', '2');
94 variable_set('pathauto_punctuation_dollar', '2');
95 variable_set('pathauto_punctuation_double_quotes', '2');
96 variable_set('pathauto_punctuation_equal', '2');
97 variable_set('pathauto_punctuation_exclamation', '2');
98 variable_set('pathauto_punctuation_greater_than', '2');
99 variable_set('pathauto_punctuation_hash', '2');
100 variable_set('pathauto_punctuation_hyphen', '2');
101 variable_set('pathauto_punctuation_left_curly', '2');
102 variable_set('pathauto_punctuation_left_parenthesis', '2');
103 variable_set('pathauto_punctuation_left_square', '2');
104 variable_set('pathauto_punctuation_less_than', '2');
105 variable_set('pathauto_punctuation_percent', '2');
106 variable_set('pathauto_punctuation_period', '2');
107 variable_set('pathauto_punctuation_pipe', '2');
108 variable_set('pathauto_punctuation_plus', '2');
109 variable_set('pathauto_punctuation_question_mark', '2');
110 variable_set('pathauto_punctuation_quotes', '2');
111 variable_set('pathauto_punctuation_right_curly', '2');
112 variable_set('pathauto_punctuation_right_parenthesis', '2');
113 variable_set('pathauto_punctuation_right_square', '2');
114 variable_set('pathauto_punctuation_semicolon', '2');
115 variable_set('pathauto_punctuation_tilde', '2');
116 variable_set('pathauto_punctuation_underscore', '2');
117 variable_set('pathauto_reduce_ascii', 0);
118 variable_set('pathauto_separator', '_');
119 variable_set('pathauto_taxonomy_1_pattern', '');
120 variable_set('pathauto_taxonomy_2_pattern', '');
121 variable_set('pathauto_taxonomy_applytofeeds', 0);
122 variable_set('pathauto_taxonomy_bulkupdate', 0);
123 variable_set('pathauto_taxonomy_pattern', 'category/[vocab-raw]/[catpath-raw]');
124 variable_set('pathauto_taxonomy_supportsfeeds', '0/feed');
125 variable_set('pathauto_transliterate', false);
126 variable_set('pathauto_update_action', '2');
127 variable_set('pathauto_user_bulkupdate', 0);
128 variable_set('pathauto_user_pattern', 'users/[user-raw]');
129 variable_set('pathauto_user_supportsfeeds', NULL);
130 variable_set('pathauto_verbose', 0);
131 variable_set('show_preview_changes_book', 1);
132 variable_set('site_footer', '');
133 variable_set('site_frontpage', 'wiki');
134 variable_set('site_mail', 'admin@localhost');
135 variable_set('site_mission', '');
136 variable_set('site_name', 'Wiki');
137 variable_set('site_slogan', '');
138 system_theme_data();
139 db_query("UPDATE {system} SET status = 1 WHERE type = 'theme' and name = '%s'", 'garland');
140 variable_set('theme_default', 'garland');
141 variable_set('theme_settings', array (
142 'toggle_node_info_page' => false,
143 ));
144 variable_set('wikitools_disallowed_characters', '[]{}|');
145 variable_set('wikitools_hijack_freelinking', 1);
146 variable_set('wikitools_main_page_title', 'Main Page');
147 variable_set('wikitools_node_types', array (
148 'book' => 'book',
149 ));
150 variable_set('wikitools_options', array (
151 'node creation' => 'node creation',
152 'node search' => 'node search',
153 'auto redirect' => 'auto redirect',
154 'unique titles' => 'unique titles',
155 'move protection' => 'move protection',
156 'delete protection' => 'delete protection',
157 'underscore as space' => 'underscore as space',
158 'dash as space' => 'dash as space',
159 ));
160 variable_set('wikitools_path', 'wiki');
161
162 // Add role "Moderator".
163 db_query("INSERT INTO {role} (`rid`, `name`) VALUES (3, '%s')", 'moderator');
164 // Set access permissions for different roles
165 db_query("UPDATE {permission} SET perm = 'create book pages, edit book pages, edit own book pages, outline posts in books, see printer-friendly version, access comments, post comments, post comments without approval, access content, revert revisions, view revisions, search content, use advanced search, access user profiles' WHERE rid = 1");
166 db_query("UPDATE {permission} SET perm = 'create book pages, edit book pages, edit own book pages, outline posts in books, see printer-friendly version, access comments, post comments, post comments without approval, access content, revert revisions, view revisions, search content, use advanced search, access user profiles, change own username' WHERE rid = 2");
167 db_query("INSERT INTO {permission} (`rid`, `perm`, `tid`) VALUES (3, 'create book pages, create new books, edit book pages, edit own book pages, outline posts in books, see printer-friendly version, access comments, administer comments, post comments, post comments without approval, access freelinking list, access content, revert revisions, view revisions, search content, use advanced search, access user profiles, administer users, change own username', 0)");
168 // Add admin user with password 'admin'
169 db_query("INSERT INTO {users} (`uid`, `name`, `pass`, `mail`, `mode`, `sort`, `threshold`, `theme`, `signature`, `created`, `access`, `login`, `status`, `timezone`, `language`, `picture`, `init`, `data`) VALUES (1, 'admin', MD5('admin'), '', 0, 0, 0, '', '', NOW(), NOW(), 0, 1, NULL, '', '', '', NULL)");
170 // Log in administrator after installation
171 user_authenticate('admin', 'admin');
172 // Add freelinking filter
173 db_query("INSERT INTO {filters} (`format`, `module`, `delta`, `weight`) VALUES (%d, 'freelinking', 0, 10)", 1);
174 system_initialize_theme_blocks('garland');
175 return;
176 }
177 ?>

  ViewVC Help
Powered by ViewVC 1.1.2