-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathxoops_version.php
205 lines (187 loc) · 6.95 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
<?php
/**
* ****************************************************************************
* userpage - MODULE FOR XOOPS
* Copyright (c) Hervé Thouzard of Instant Zero (http://www.instant-zero.com)
*
* You may not change or alter any portion of this comment or credits
* of supporting developers from this source code or any supporting source code
* which is considered copyrighted (c) material of the original comment or credit authors.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
* @copyright Hervé Thouzard of Instant Zero (http://www.instant-zero.com)
* @license http://www.fsf.org/copyleft/gpl.html GNU public license
* @package userpage
* @author Hervé Thouzard of Instant Zero (http://www.instant-zero.com)
*
* ****************************************************************************
*/
defined('XOOPS_ROOT_PATH') || die('XOOPS root path not defined');
$modversion['version'] = 2.0;
$modversion['module_status'] = 'Beta 1';
$modversion['release_date'] = '2019/05/30';
$modversion['name'] = _MI_USERPAGE_NAME;
$modversion['description'] = _MI_USERPAGE_DESC;
$modversion['credits'] = 'DefianceB0y, Riosoft, Shine, Gibaphp, Feichtl and Calidro (and all the others) for the quick translations !';
$modversion['author'] = 'Instant Zero - http://xoops.instant-zero.com';
$modversion['help'] = 'page=help';
$modversion['license'] = 'GNU GPL 2.0 or later';
$modversion['license_url'] = 'www.gnu.org/licenses/gpl-2.0.html';
$modversion['official'] = 0;
$modversion['image'] = 'assets/images/logoModule.png';
$modversion['dirname'] = basename(__DIR__);
$modversion['modicons16'] = 'assets/images/icons/16';
$modversion['modicons32'] = 'assets/images/icons/32';
//about
$modversion['module_website_url'] = 'www.xoops.org';
$modversion['module_website_name'] = 'XOOPS';
$modversion['min_php'] = '5.3.7';
$modversion['min_xoops'] = '2.5.9';
$modversion['min_admin'] = '1.2';
$modversion['min_db'] = ['mysql' => '5.5'];
$modversion['sqlfile']['mysql'] = 'sql/mysql.sql';
// Tables created by sql file (without prefix!)
$modversion['tables'][0] = 'userpage';
// Admin things
$modversion['hasAdmin'] = 1;
$modversion['system_menu'] = 1;
$modversion['adminindex'] = 'admin/index.php';
$modversion['adminmenu'] = 'admin/menu.php';
// ------------------- Help files ------------------- //
$modversion['helpsection'] = [
['name' => _MI_USERPAGE_OVERVIEW, 'link' => 'page=help'],
['name' => _MI_USERPAGE_DISCLAIMER, 'link' => 'page=disclaimer'],
['name' => _MI_USERPAGE_LICENSE, 'link' => 'page=license'],
['name' => _MI_USERPAGE_SUPPORT, 'link' => 'page=support'],
];
// ------------------- Templates ------------------- //
$modversion['templates'] = [
['file' => 'userpage_index.tpl', 'description' => 'Show and edit a user page and show a list of all pages'],
['file' => 'userpage_rss.tpl', 'description' => 'RSS Feed'],
['file' => 'userpage_edit.tpl', 'description' => "Form used to edit a user's page"],
['file' => 'userpage_list.tpl', 'description' => "Show a list of user's page"],
];
// ------------------- Blocks ------------------- //
$modversion['blocks'][] = [
'file' => 'userpage_last.php',
'name' => _MI_USERPAGE_BNAME1,
'description' => 'Show last pages',
'show_func' => 'b_userpage_last_show',
'edit_func' => 'b_userpage_last_edit',
'options' => '10|30', // 10=Items count, 30=Title's length
'template' => 'userpage_block_last.tpl',
];
$modversion['blocks'][] = [
'file' => 'userpage_top.php',
'name' => _MI_USERPAGE_BNAME2,
'description' => 'Show most viewed pages',
'show_func' => 'b_userpage_top_show',
'edit_func' => 'b_userpage_top_edit',
'options' => '10|30', // 10=Items count, 30=Title's length
'template' => 'userpage_block_top.tpl',
];
$modversion['blocks'][] = [
'file' => 'userpage_random.php',
'name' => _MI_USERPAGE_BNAME3,
'description' => 'Show random pages',
'show_func' => 'b_userpage_random_show',
'edit_func' => 'b_userpage_random_edit',
'options' => '10|30', // 10=Items count, 30=Title's length
'template' => 'userpage_block_random.tpl',
];
// Menu
$modversion['hasMain'] = 1;
$modversion['sub'][1]['name'] = _MI_USERPAGE_MENU1;
$modversion['sub'][1]['url'] = 'userpage_list.php';
// Search
$modversion['hasSearch'] = 1;
$modversion['search']['file'] = 'include/search.inc.php';
$modversion['search']['func'] = 'userpage_search';
// Comments
$modversion['hasComments'] = 1;
$modversion['comments']['pageName'] = 'index.php';
$modversion['comments']['itemName'] = 'page_id';
/**
* Allow html ?
*/
$modversion['config'][] = [
'name' => 'allowhtml',
'title' => '_MI_USERPAGE_OPT0',
'description' => '_MI_USERPAGE_OPT0_DSC',
'formtype' => 'yesno',
'valuetype' => 'int',
'default' => 0,
];
/**
* Allow RSS Feeds ?
*/
$modversion['config'][] = [
'name' => 'allowrss',
'title' => '_MI_USERPAGE_OPT1',
'description' => '_MI_USERPAGE_OPT1_DSC',
'formtype' => 'yesno',
'valuetype' => 'int',
'default' => 1,
];
/**
* Date's format. If you don't specify anything then the default date's format will be used
*/
$modversion['config'][] = [
'name' => 'dateformat',
'title' => '_MI_USERPAGE_OPT3',
'description' => '_MI_USERPAGE_OPT3_DSC',
'formtype' => 'textbox',
'valuetype' => 'text',
'default' => '',
];
/**
* Number of characters to use in the RSS feed
*/
$modversion['config'][] = [
'name' => 'rsslength',
'title' => '_MI_USERPAGE_OPT4',
'description' => '_MI_USERPAGE_OPT4_DSC',
'formtype' => 'textbox',
'valuetype' => 'int',
'default' => 200,
];
/**
* Number of lines per page
*/
$modversion['config'][] = [
'name' => 'linesperpage',
'title' => '_MI_USERPAGE_OPT5',
'description' => '_MI_USERPAGE_OPT5_DSC',
'formtype' => 'textbox',
'valuetype' => 'int',
'default' => 10,
];
/**
* Editor to use
*/
xoops_load('xoopseditorhandler');
$editorHandler = \XoopsEditorHandler::getInstance();
$modversion['config'][] = [
'name' => 'usekiovi',
'title' => '_MI_USERPAGE_OPT6',
'description' => '_MI_USERPAGE_OPT6_DSC',
'formtype' => 'select',
'valuetype' => 'text',
'default' => 'dhtml',
'options' => array_flip($editorHandler->getList()),
];
/**
* Allow html ?
*/
$modversion['config'][] = [
'name' => 'url_rewriting',
'title' => '_MI_USERPAGE_URL_REWRITING',
'description' => '',
'formtype' => 'yesno',
'valuetype' => 'int',
'default' => 0,
];
// Notifications
$modversion['hasNotification'] = 0;