-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathxoops_version.php
More file actions
281 lines (252 loc) · 10.1 KB
/
xoops_version.php
File metadata and controls
281 lines (252 loc) · 10.1 KB
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
<?php
/*
------------------------------------------------------------------------
XOOPS - PHP Content Management System
Copyright (c) 2000 XOOPS.org
<https://xoops.org>
------------------------------------------------------------------------
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
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. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-------------------------------------------------------------------------
Author: Raul Recio (AKA UNFOR)
Project: The XOOPS Project
-------------------------------------------------------------------------
*/
/**
* XoopsPartners - a partner affiliation links module
*
* @package module\Xoopspartners\init
* @author Raul Recio (aka UNFOR)
* @author XOOPS Module Development Team
* @copyright {@link https://xoops.org 2001-2016 XOOPS Project}
* @license {@link https://www.gnu.org/licenses/gpl-2.0.html GNU Public License}
* @link https://xoops.org XOOPS
*/
defined('XOOPS_ROOT_PATH') || exit('Restricted access');
require_once __DIR__ . '/preloads/autoloader.php';
$moduleDirName = basename(__DIR__);
$moduleDirNameUpper = mb_strtoupper($moduleDirName);
$modversion = [
'version' => 2.01,
'module_status' => 'Beta 1',
'release_date' => '2020/06/20',
'name' => _MI_XOOPSPARTNERS_NAME,
'description' => _MI_XOOPSPARTNERS_DESC,
'official' => 0, // 1 if maintained by XOOPS CORE Development Team
'author' => 'Raul Recio (unfor)',
'credits' => 'Mage, Mamba, ZySpec',
'license' => 'GNU GPL 2.0',
'license_url' => 'www.gnu.org/licenses/gpl-2.0.html/',
'help' => 'page=help',
'image' => 'assets/images/logoModule.png',
'dirname' => $moduleDirName,
//help files
'helpsection' => [
['name' => _MI_XOOPSPARTNERS_HELP_OVERVIEW, 'link' => 'page=help',],
['name' => _MI_XOOPSPARTNERS_HELP_ISSUES, 'link' => 'page=issues',],
],
'author_website_url' => 'https://xoops.org',
'author_website_name' => 'XOOPS',
'module_website_url' => 'https://xoops.org',
'module_website_name' => 'XOOPS Community',
'min_php' => '7.2',
'min_xoops' => '2.5.10',
'min_db' => ['mysql' => '5.5'],
'min_admin' => '1.2',
// 'onInstall' => 'include/action.module.php',
// 'onUpdate' => 'include/action.module.php',
// 'onUninstall' => 'include/action.module.php',
'onInstall' => 'include/onuninstall.php',
'onUpdate' => 'include/onupdate.php',
'onUninstall' => 'include/onuninstall.php',
/**
* dB settings
*/
// All tables should not have any prefix!
'sqlfile' => ['mysql' => 'sql/mysql.sql'],
// Tables created by sql file (without prefix!)
'tables' => ['partners'],
/**
* Admin things
*/
'hasAdmin' => 1,
'adminindex' => 'admin/index.php',
'adminmenu' => 'admin/menu.php',
// Set to 1 if you want to display menu generated by system module
'system_menu' => 1,
/**
* Blocks
*/
'blocks' => [
[
'file' => 'partners.php',
'name' => _MI_XOOPSPARTNERS_NAME,
'description' => _MI_XOOPSPARTNERS_DESC,
'show_func' => 'b_xoopspartners_show',
'edit_func' => 'b_xoopspartners_edit',
'options' => '1|1|1|1|1|hits|DESC|0',
'template' => 'xoopspartners_block_site.tpl',
],
],
// Menu
'hasMain' => 1,
/**
* Templates
*/
'templates' => [
[
'file' => 'xoopspartners_index.tpl',
'description' => _MI_XOOPSPARTNERS_TMPLT1_DESC,
],
[
'file' => 'xoopspartners_join.tpl',
'description' => _MI_XOOPSPARTNERS_TMPLT2_DESC,
],
],
// Config Settings (only for modules that need config settings generated automatically)
// name of config option for accessing its specified value. i.e. $helper->getConfig('storyhome')
'config' => [
[
'name' => 'cookietime',
// title of this config option displayed in config settings form
'title' => '_MI_XOOPSPARTNERS_RECLICK',
'description' => '',
// Form element type used in config form for this option. C
// Can be one of either textbox, textarea, select, select_multi, yesno, group, group_multi
//
'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 'array'
// form type of 'yesno', 'group' must be always be 'int'
'valuetype' => 'int',
// the default value for this option
// ignore it if no default
// 'yesno' formtype must be either 0(no) or 1(yes)
'default' => 86400,
'options' => [
'_MI_XOOPSPARTNERS_HOUR' => '3600',
'_MI_XOOPSPARTNERS_3HOURS' => '10800',
'_MI_XOOPSPARTNERS_5HOURS' => '18000',
'_MI_XOOPSPARTNERS_10HOURS' => '36000',
'_MI_XOOPSPARTNERS_DAY' => '86400',
],
],
[
'name' => 'modlimit',
'title' => '_MI_XOOPSPARTNERS_MLIMIT',
'description' => '_MI_XOOPSPARTNERS_MLIMITDSC',
'formtype' => 'textbox',
'valuetype' => 'int',
'default' => 5,
],
[
'name' => 'modshow',
'title' => '_MI_XOOPSPARTNERS_MSHOW',
'description' => '_MI_XOOPSPARTNERS_MSHOWDSC',
'formtype' => 'select',
'valuetype' => 'int',
'default' => 1,
'options' => [
'_MI_XOOPSPARTNERS_IMAGES' => 1,
'_MI_XOOPSPARTNERS_TEXT' => 2,
'_MI_XOOPSPARTNERS_BOTH' => 3,
],
],
[
'name' => 'modsort',
'title' => '_MI_XOOPSPARTNERS_MSORT',
'description' => '_MI_XOOPSPARTNERS_MSORTDSC',
'formtype' => 'select',
'valuetype' => 'text',
'default' => 'hits',
'options' => [
'_MI_XOOPSPARTNERS_ID' => 'id',
'_MI_XOOPSPARTNERS_HITS' => 'hits',
'_MI_XOOPSPARTNERS_TITLE' => 'title',
'_MI_XOOPSPARTNERS_WEIGHT' => 'weight',
],
],
[
'name' => 'modorder',
'title' => '_MI_XOOPSPARTNERS_MORDER',
'description' => '_MI_XOOPSPARTNERS_MORDERDSC',
'formtype' => 'select',
'valuetype' => 'text',
'default' => 'DESC',
'options' => [
'_ASCENDING' => 'ASC',
'_DESCENDING' => 'DESC',
],
],
[
'name' => 'incadmin',
'title' => '_MI_XOOPSPARTNERS_INCADMIN',
'description' => '_MI_XOOPSPARTNERS_INCADMINDSC',
'formtype' => 'yesno',
'valuetype' => 'int',
'default' => 1,
],
// Max Filesize Upload in kilo bytes
[
'name' => 'maxuploadsize',
'title' => '_MI_XOOPSPARTNERS_UPLOADFILESIZE',
'description' => '_MI_XOOPSPARTNERS_UPLOADFILESIZE_DESC',
'formtype' => 'textbox',
'valuetype' => 'int',
'default' => 1048576,
],
// Max width
[
'name' => 'maxwidth',
'title' => '_MI_XOOPSPARTNERS_IMAGE_MAX_WIDTH',
'description' => '_MI_XOOPSPARTNERS_IMAGE_MAX_WIDTH_DESC',
'formtype' => 'textbox',
'valuetype' => 'int',
'default' => 150,
],
// Max height
[
'name' => 'maxheight',
'title' => '_MI_XOOPSPARTNERS_IMAGE_MAX_HEIGHT',
'description' => '_MI_XOOPSPARTNERS_IMAGE_MAX_WIDTH_DESC',
'formtype' => 'textbox',
'valuetype' => 'int',
'default' => 110,
],
/**
* Make Sample button visible?
*/
[
'name' => 'displaySampleButton',
'title' => 'CO_' . $moduleDirNameUpper . '_' . 'SHOW_SAMPLE_BUTTON',
'description' => 'CO_' . $moduleDirNameUpper . '_' . 'SHOW_SAMPLE_BUTTON_DESC',
'formtype' => 'yesno',
'valuetype' => 'int',
'default' => 1,
],
/**
* Show Developer Tools?
*/
[
'name' => 'displayDeveloperTools',
'title' => 'CO_' . $moduleDirNameUpper . '_' . 'SHOW_DEV_TOOLS',
'description' => 'CO_' . $moduleDirNameUpper . '_' . 'SHOW_DEV_TOOLS_DESC',
'formtype' => 'yesno',
'valuetype' => 'int',
'default' => 0,
],
],
];