-
Notifications
You must be signed in to change notification settings - Fork 2
/
xoops_version.php
349 lines (310 loc) · 11.9 KB
/
xoops_version.php
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
340
341
342
343
344
345
346
347
348
<?php
/**
* Main configuration file for SimplyWiki
*
* @package SimplyWiki
* @author Steve Kenow <skenow@impresscms.org>
* @author Wiwimod: Xavier JIMENEZ
* @author Wiwimod: Gizmhail
* @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU General Public License (GPL)
* @version $Id$
*/
$modversion = array(
'name' => _MI_SWIKI_NAME,
'version' => '1.21',
'status' => 'Final',
'description' => _MI_SWIKI_DESC,
'author' => 'Steve Kenow <skenow@impresscms.org>',
'credits' => 'Based on Wiwimod by Xavier JIMENEZ; with further contributions by Gizmhail and GibaPHP',
'license' => 'GNU General Public License',
'help' => '',
'official' => 0,
'image' => 'images/wiwilogo-blue.gif', /* standard XOOPS icon, 92x52 px */
'iconbig' => 'images/wiwimod.png', /* big icon for ImpressCMS, 37x35 px */
'iconsmall' => 'images/wiwimod-small.png', /* small icon for ImpressCMS, 16x16 px */
'dirname' => basename(dirname(__FILE__)),
'onInstall' => 'include/oninstall.inc.php',
'onUpdate' => 'include/onupdate.inc.php',
'demo_site_url' => 'http://www.simplywiki.org/',
'demo_site_name' => 'SimplyWiki',
'support_site_url' => 'http://community.impresscms.org/',
'support_site_name' => 'ImpressCMS Community',
'submit_bug' => '',
'submit_feature' => '',
'warning' => '',
'author_word' => '_MI_SWIKI_AUTHOR_WORD',
);
if (defined('ICMS_URL')) {
$modversion['image'] = 'images/wiwimod.png';
} else {
/* These are here for cross-platform compatibility */
define('ICMS_URL', XOOPS_URL);
define('ICMS_ROOT_PATH', XOOPS_ROOT_PATH);
}
// Tables created by the SQL file (without prefix!)
$modversion['sqlfile']['mysql'] = 'sql/mysql.sql';
$modversion['tables'] = array(
'wiki_pages',
'wiki_revisions',
'wiki_profiles',
'wiki_prof_groups',
);
// Administration tools
$modversion['hasAdmin'] = 1;
$modversion['adminindex'] = 'admin/index.php';
$modversion['adminmenu'] = 'admin/menu.php';
// Main menu
$modversion['hasMain'] = 1;
// Templates
$modversion['templates'][1] = array(
'file' => 'wiwimod_view.html',
'description' => _MI_SWIKI_TEMPLATE_VIEW_DESC);
$modversion['templates'][] = array(
'file' => 'wiwimod_edit.html',
'description' => _MI_SWIKI_TEMPLATE_EDIT_DESC);
$modversion['templates'][]= array(
'file' => 'wiwimod_history.html',
'description' => _MI_SWIKI_TEMPLATE_HISTORY_DESC);
$modversion['templates'][] = array(
'file' => 'wiwimod_pdf.html',
'description' => _MI_SWIKI_TEMPLATE_PDF_DESC);
// Search
$modversion['hasSearch'] = 1;
$modversion['search'] = array(
'file' => 'include/search.php',
'func' => 'swiki_search',
);
// Comments
$modversion['hasComments'] = 1;
$modversion['comments'] = array(
'itemName' => 'pageid',
'pageName' => 'index.php',
);
// Blocks
$modversion['blocks'][1] = array(
'file' => 'wiwimod_toc.php',
'name' => _MI_SWIKI_BLOCK_TOC_NAME,
'description' => _MI_SWIKI_BLOCK_TOC_DESC,
'show_func' => 'swiki_toc',
'template' => 'wiwimod_toc.html',
'can_clone' => true);
$modversion['blocks'][] = array(
'file' => 'wiwimod_recent.php',
'name' => _MI_SWIKI_BLOCK_RECENT_NAME,
'description' => _MI_SWIKI_BLOCK_RECENT_DESC,
'show_func' => 'swiki_recent',
'edit_func' => 'swiki_recent_blockedit',
'options' => '5',
'template' => 'wiwimod_recent.html',
'can_clone' => true);
$modversion['blocks'][] = array(
'file' => 'wiwimod_showpage.php',
'name' => _MI_SWIKI_BLOCK_RELATED_NAME,
'description' => _MI_SWIKI_BLOCK_RELATED_DESC,
'show_func' => 'swiki_contextshow',
'template' => 'wiwimod_context.html',
'can_clone' => true);
$modversion['blocks'][] = array(
'file' => 'wiwimod_showpage.php',
'name' => _MI_SWIKI_BLOCK_SHOWPAGE_NAME,
'description' => _MI_SWIKI_BLOCK_SHOWPAGE_DESC,
'show_func' => 'swiki_showpage',
'edit_func' => 'swiki_showpage_blockedit',
'options' => '_MI_SWIKI_HOME|0|0',
'template' => 'wiwimod_showpage.html',
'can_clone' => true);
$modversion['blocks'][] = array(
'file' => 'swiki_blocks.php',
'name' => _MI_SWIKI_BLOCK_LISTPAGES_NAME,
'description' => _MI_SWIKI_BLOCK_LISTPAGES_DESC,
'show_func' => 'swiki_listpages',
'edit_func' => 'swiki_listpages_blockedit',
'options' => '5|createdate|DESC|full|',
'template' => 'swiki_listpages.html',
'can_clone' => true);
$modversion['blocks'][] = array(
'file' => 'swiki_blocks.php',
'name' => _MI_SWIKI_BLOCK_ADDPAGE_NAME,
'description' => _MI_SWIKI_BLOCK_ADDPAGE_DESC,
'show_func' => 'swiki_addpage',
'template' => 'swiki_addpage.html',
'can_clone' => true);
include_once dirname(__FILE__) . '/include/functions.php';
if (isTagModuleActivated()) {
$modversion['blocks'][] = array(
'file' => 'swiki_blocks.php',
'name' => _MI_SWIKI_BLOCK_TAGCLOUD_NAME,
'description' => _MI_SWIKI_BLOCK_TAGCLOUD_DESC,
'show_func' => 'swiki_tag_block_cloud_show',
'edit_func' => 'swiki_tag_block_cloud_edit',
'options' => '100|0|150|80',
'template' => 'swiki_tag_block_cloud.html',
'can_clone' => true );
$modversion['blocks'][] = array(
'file' => 'swiki_blocks.php',
'name' => _MI_SWIKI_BLOCK_TAG_NAME,
'description' => _MI_SWIKI_BLOCK_TAG_DESC,
'show_func' => 'swiki_tag_block_top_show',
'edit_func' => 'swiki_tag_block_top_edit',
'options' => '20|0|c',
'template' => 'swiki_tag_block_tag.html',
'can_clone' => true);
}
// Admin preferences items
// name of config option for accessing its specified value. i.e. $xoopsModuleConfig['storyhome']
$modversion['config'][1]['name'] = 'Editor';
// title of this config option displayed in config settings form
$modversion['config'][1]['title'] = '_MI_SWIKI_EDITOR';
// description of this config option displayed under title
$modversion['config'][1]['description'] = '_MI_SWIKI_EDITOR_DESC';
// form element type used in config form for this option. can be one of either textbox, textarea, select, select_multi, yesno, group, group_multi
$modversion['config'][1]['formtype'] = 'select';
// value type of this config option. can be one of either int, text, float, array, or other
// form type of group_multi, select_multi must always be value type of array
$modversion['config'][1]['valuetype'] = 'int';
// the default value for this option
// ignore it if no default
// 'yesno' formtype must be either 0(no) or 1(yes)
$modversion['config'][1]['default'] = 0;
// options to be displayed in selection box
// required and valid for 'select' or 'select_multi' formtype option only
// language constants can be used for array key, otherwise use integer
//$modversion['config'][1]['options'] = array('5' => 5, '10' => 10, '15' => 15, '20' => 20, '25' => 25, '30' => 30);
$modversion['config'][1]['options'] = array(
'Xoops Standard' => 0,
'XoopsEditor' => 1);
if (file_exists(ICMS_ROOT_PATH.'/class/spaw/formspaw.php')){
$modversion['config'][1]['options']['Spaw'] = 2;}
if (file_exists(ICMS_ROOT_PATH.'/class/htmlarea/formhtmlarea.php')){
$modversion['config'][1]['options']['HtmlArea'] = 3;}
if (file_exists(ICMS_ROOT_PATH. '/class/wysiwyg/formwysiwygtextarea.php')){
$modversion['config'][1]['options']['Koivi'] = 4;}
if (file_exists(ICMS_ROOT_PATH.'/class/fckeditor/formfckeditor.php')){
$modversion['config'][1]['options']['FCK Editor'] = 5;}
$modversion['config'][2] = array(
'name' => 'XoopsEditor',
'title' => '_MI_SWIKI_XOOPSEDITOR',
'description' => '_MI_SWIKI_XOOPSEDITOR_DESC',
'formtype' => 'select',
'valuetype' => 'text',
'default' => 0);
if (file_exists(ICMS_ROOT_PATH . '/class/xoopseditor/xoopseditor.php')) {
include_once ICMS_ROOT_PATH . '/class/xoopslists.php';
include_once ICMS_ROOT_PATH . '/class/xoopseditor/xoopseditor.php';
$editor_name = !empty($_GET['editor_name']) ? $_GET['editor_name'] : '';
$editorhandler = new XoopsEditorHandler();
$modversion['config'][2]['options'] = array_flip($editorhandler->getList());
}
else $modversion['config'][2]['options'] = array();
$modversion['config'][] = array(
'name' => 'DefaultProfile',
'title' => '_MI_SWIKI_DEFAULTPROFILE',
'description' => '_MI_SWIKI_DEFAULTPROFILE_DESC',
'formtype' => 'select',
'valuetype' => 'int',
'default' => 0,
'options' => array());
$modversion['config'][] = array(
'name' => 'allowPDF',
'title' => '_MI_SWIKI_ALLOWPDF',
'description' => '_MI_SWIKI_ALLOWPDF_DESC',
'formtype' => 'yesno',
'valuetype' => 'int',
'default' => 0);
$modversion['config'][] = array(
'name' => 'ShowTitles',
'title' => '_MI_SWIKI_SHOWTITLES',
'description' => '_MI_SWIKI_SHOWTITLES_DESC',
'formtype' => 'yesno',
'valuetype' => 'int',
'default' => 0);
$modversion['config'][] = array(
'name' => 'ShowCamelCase',
'title' => '_MI_SWIKI_USECAMELCASE',
'description' => '_MI_SWIKI_USECAMELCASE_DESC',
'formtype' => 'yesno',
'valuetype' => 'int',
'default' => 0);
$modversion['config'][] = array(
'name' => 'TopPage',
'title' => '_MI_SWIKI_TOPPAGE',
'description' => '_MI_SWIKI_TOPPAGE_DESC',
'formtype' => 'textbox',
'valuetype' => 'text',
'default' => _MI_SWIKI_HOME);
$modversion['config'][] = array(
'name' => 'ShowPageInfo',
'title' => '_MI_SWIKI_PAGEINFO',
'description' => '_MI_SWIKI_PAGEINFO_DESC',
'formtype' => 'select_multi',
'valuetype' => 'array',
'options' => array( '_MI_SWIKI_SHOWREVISIONS' => 'ShowRevisions',
'_MI_SWIKI_SHOWVIEWS' => 'ShowViews',
'_MI_SWIKI_SHOWCREATED' => 'ShowCreated' ,
'_MI_SWIKI_SHOWLASTREVISED' => 'ShowLastRevised',
'_MI_SWIKI_LASTVIEWED' => 'ShowLastViewed'),
'default' => 'ShowLastRevised' );
$modversion['config'][] = array(
'name' => 'Captcha',
'title' => '_MI_SWIKI_USECAPTCHA',
'description' => '_MI_SWIKI_USECAPTCHA_DESC',
'formtype' => 'yesno',
'valuetype' => 'int',
'default' => 1);
$modversion['config'][] = array(
'name' => 'ShowQuickAdd',
'title' => '_MI_SWIKI_SHOWQUICKADD',
'description' => '_MI_SWIKI_SHOWQUICKADD_DESC',
'formtype' => 'yesno',
'valuetype' => 'int',
'default' => 1);
// Notification
$modversion['hasNotification'] = 1;
$modversion['notification'] = array(
'lookup_file' => 'include/notification.inc.php',
'lookup_func' => 'swiki_notify_iteminfo');
$modversion['notification']['category'][1] = array(
'name' => 'page',
'title' => _MI_SWIKI_PAGENOTIFYCAT_TITLE,
'description' => '_MI_SWIKI_PAGENOTIFYCAT_DESC',
'subscribe_from' => array('index.php'),
'allow_bookmark' => 1,
'item_name' => 'pageid'); // must be a numeric value passed in a $_GET variable, or empty for global matching. See ROOT/include/notification_functions.php
$modversion['notification']['category'][] = array(
'name' => 'global',
'title' => _MI_SWIKI_GLOBALNOTIFYCAT_TITLE,
'description' => '_MI_SWIKI_GLOBALNOTIFYCAT_DESC',
'subscribe_from' => array('index.php'),
'item_name' => ''); // must be a numeric value passed in a $_GET variable, or empty for global matching. See ROOT/include/notification_functions.php
$modversion['notification']['event'][1] = array(
'name' => 'page_modified',
'category' => 'page',
'title' => _MI_SWIKI_PAGENOTIFY_TITLE,
'caption' => _MI_SWIKI_PAGENOTIFY_CAPTION,
'description' => _MI_SWIKI_PAGENOTIFY_DESC,
'mail_template' => 'global_pagemodified_notify',
'mail_subject' => _MI_SWIKI_PAGENOTIFY_SUBJECT);
$modversion['notification']['event'][] = array(
'name' => 'page_modified',
'category' => 'global',
'title' => _MI_SWIKI_GLOBALNOTIFY_TITLE,
'caption' => _MI_SWIKI_GLOBALNOTIFY_CAPTION,
'description' => _MI_SWIKI_GLOBALNOTIFY_DESC,
'mail_template' => 'global_pagemodified_notify',
'mail_subject' => _MI_SWIKI_GLOBALNOTIFY_SUBJECT);
$modversion['notification']['event'][] = array(
'name' => 'page_restored',
'category' => 'page',
'title' => _MI_SWIKI_PAGERESTORE_TITLE,
'caption' => _MI_SWIKI_PAGERESTORE_CAPTION,
'description' => _MI_SWIKI_PAGERESTORE_DESC,
'mail_template' => 'global_pagemodified_notify',
'mail_subject' => _MI_SWIKI_PAGERESTORE_SUBJECT);
$modversion['notification']['event'][] = array(
'name' => 'page_restored',
'category' => 'global',
'title' => _MI_SWIKI_GLOBALPAGERESTORE_TITLE,
'caption' => _MI_SWIKI_GLOBALPAGERESTORE_CAPTION,
'description' => _MI_SWIKI_GLOBALPAGERESTORE_DESC,
'mail_template' => 'global_pagemodified_notify',
'mail_subject' => _MI_SWIKI_GLOBALPAGERESTORE_SUBJECT);