1
|
|
|
<?php |
2
|
|
|
/* |
3
|
|
|
You may not change or alter any portion of this comment or credits |
4
|
|
|
of supporting developers from this source code or any supporting source code |
5
|
|
|
which is considered copyrighted (c) material of the original comment or credit authors. |
6
|
|
|
|
7
|
|
|
This program is distributed in the hope that it will be useful, |
8
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of |
9
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
10
|
|
|
*/ |
11
|
|
|
|
12
|
|
|
/** |
13
|
|
|
* @copyright XOOPS Project (https://xoops.org) |
14
|
|
|
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU Public License |
15
|
|
|
* @package Mymenus |
16
|
|
|
* @since 1.0 |
17
|
|
|
* @author trabis <[email protected]>, bleekk <[email protected]> |
18
|
|
|
*/ |
19
|
|
|
|
20
|
|
|
defined('XOOPS_ROOT_PATH') || die('Restricted access'); |
21
|
|
|
|
22
|
|
|
require __DIR__ . '/preloads/autoloader.php'; |
23
|
|
|
|
24
|
|
|
$moduleDirName = basename(__DIR__); |
25
|
|
|
|
26
|
|
|
// ------------------- Informations ------------------- // |
27
|
|
|
$modversion = [ |
28
|
|
|
'version' => 1.54, |
29
|
|
|
'module_status' => 'Beta 2', |
30
|
|
|
'release_date' => '2018/07/20', // YYYY/mm/dd |
31
|
|
|
'name' => _MI_MYMENUS_MD_NAME, |
32
|
|
|
'description' => _MI_MYMENUS_MD_DESC, |
33
|
|
|
'author' => 'Trabis (www.xuups.com), contributors: Mamba, Bleek, Zyspec, Luciorota', |
34
|
|
|
// 'author_mail' => " ", |
35
|
|
|
'author_website_url' => 'http://xuups.com', |
36
|
|
|
'author_website_name' => 'XUUPS', |
37
|
|
|
'credits' => 'XOOPS Development Team', |
38
|
|
|
'license' => 'GPL 2.0 or later', |
39
|
|
|
'license_url' => 'www.gnu.org/licenses/gpl-2.0.html/', |
40
|
|
|
'help' => 'page=help', |
41
|
|
|
'release_info' => 'release_info', |
42
|
|
|
'release' => '2017-07-20', |
43
|
|
|
'release_file' => XOOPS_URL . "/modules/{$moduleDirName}/docs/release_info file", |
|
|
|
|
44
|
|
|
'manual' => 'link to manual file', |
45
|
|
|
'manual_file' => XOOPS_URL . "/modules/{$moduleDirName}/docs/install.txt", |
46
|
|
|
'min_php' => '5.6', |
47
|
|
|
'min_xoops' => '2.5.9', |
48
|
|
|
'min_admin' => '1.2', |
49
|
|
|
'min_db' => ['mysql' => '5.5'], |
50
|
|
|
'image' => 'assets/images/logoModule.png', // Path and name of the module’s logo |
51
|
|
|
'official' => 1, //1 indicates supported by XOOPS Dev Team, 0 means 3rd party supported |
52
|
|
|
'dirname' => $moduleDirName, |
53
|
|
|
// Local icons paths |
54
|
|
|
'modicons16' => 'assets/images/icons/16', |
55
|
|
|
'modicons32' => 'assets/images/icons/32', |
56
|
|
|
'demo_site_url' => 'https://xoops.org', |
57
|
|
|
'demo_site_name' => 'XOOPS Demo Site', |
58
|
|
|
'support_url' => 'https://xoops.org/modules/newbb', |
59
|
|
|
'support_name' => 'Support Forum', |
60
|
|
|
'module_website_url' => 'www.xoops.org', |
61
|
|
|
'module_website_name' => 'XOOPS Project', |
62
|
|
|
// Admin things |
63
|
|
|
'hasAdmin' => 1, |
64
|
|
|
'system_menu' => 1, |
65
|
|
|
'adminindex' => 'admin/index.php', |
66
|
|
|
'adminmenu' => 'admin/menu.php', |
67
|
|
|
// Main Menu |
68
|
|
|
'hasMain' => 0, |
69
|
|
|
// Install/Update |
70
|
|
|
//'onInstall' => "include/oninstall.php", |
71
|
|
|
//'onUninstall' => "include/onuninstall.php", |
72
|
|
|
'onUpdate' => 'include/onupdate.php', |
73
|
|
|
// Search |
74
|
|
|
'hasSearch' => 0, |
75
|
|
|
// Comments |
76
|
|
|
'hasComments' => 0, |
77
|
|
|
// Notification |
78
|
|
|
'hasNotification' => 0 |
79
|
|
|
]; |
80
|
|
|
|
81
|
|
|
require XOOPS_ROOT_PATH . '/modules/' . $modversion['dirname'] . '/include/constants.php'; |
|
|
|
|
82
|
|
|
|
83
|
|
|
// ------------------- Help files ------------------- // |
84
|
|
|
$modversion['helpsection'] = [ |
85
|
|
|
['name' => _MI_MYMENUS_HELP_OVERVIEW, 'link' => 'page=help'], |
86
|
|
|
['name' => _MI_MYMENUS_HELP_SKINS, 'link' => 'page=skins'], |
87
|
|
|
['name' => _MI_MYMENUS_HELP_USAGE, 'link' => 'page=usage'], |
88
|
|
|
['name' => _MI_MYMENUS_DISCLAIMER, 'link' => 'page=disclaimer'], |
89
|
|
|
['name' => _MI_MYMENUS_LICENSE, 'link' => 'page=license'], |
90
|
|
|
['name' => _MI_MYMENUS_SUPPORT, 'link' => 'page=support'], |
91
|
|
|
]; |
92
|
|
|
|
93
|
|
|
// ------------------- Mysql ------------------- // |
94
|
|
|
// Sql file (must contain sql generated by phpMyAdmin or phpPgAdmin) |
95
|
|
|
// All tables should not have any prefix! |
96
|
|
|
$modversion['sqlfile']['mysql'] = 'sql/mysql.sql'; |
97
|
|
|
|
98
|
|
|
// Tables created by sql file (without prefix!) |
99
|
|
|
$modversion['tables'] = [ |
100
|
|
|
$moduleDirName . '_links', |
101
|
|
|
$moduleDirName . '_menus' |
102
|
|
|
]; |
103
|
|
|
|
104
|
|
|
// ------------------- Blocks ------------------- // |
105
|
|
|
$modversion['blocks'][] = [ |
106
|
|
|
'file' => $moduleDirName . '_block.php', |
107
|
|
|
'name' => _MI_MYMENUS_BLK, |
108
|
|
|
'description' => _MI_MYMENUS_BLK_DSC, |
109
|
|
|
'show_func' => $moduleDirName . '_block_show', |
110
|
|
|
'edit_func' => $moduleDirName . '_block_edit', |
111
|
|
|
'options' => '0|default|0|block||', // mid|moduleSkin|useThemeSkin|displayMethod|unique_id|themeSkin |
112
|
|
|
'template' => $moduleDirName . '_block.tpl' |
113
|
|
|
]; |
114
|
|
|
|
115
|
|
|
// ------------------- Templates ------------------- // |
116
|
|
|
|
117
|
|
|
// ------------------- Config ------------------- // |
118
|
|
|
$modversion['config'][] = [ |
119
|
|
|
'name' => 'admin_perpage', |
120
|
|
|
'title' => '_MI_MYMENUS_CONF_ADMINPERPAGE', |
121
|
|
|
'description' => '_MI_MYMENUS_CONF_ADMINPERPAGE_DSC', |
122
|
|
|
'formtype' => 'select', |
123
|
|
|
'valuetype' => 'int', |
124
|
|
|
'default' => '10', |
125
|
|
|
'options' => ['5' => 5, '10' => 10, '15' => 15, '20' => 20, '25' => 25, '30' => 30, '50' => 50] |
126
|
|
|
]; |
127
|
|
|
|
128
|
|
|
$modversion['config'][] = [ |
129
|
|
|
'name' => 'assign_method', |
130
|
|
|
'title' => '_MI_MYMENUS_CONF_ASSIGN_METHOD', |
131
|
|
|
'description' => '_MI_MYMENUS_CONF_ASSIGN_METHOD_DSC', |
132
|
|
|
'formtype' => 'select', |
133
|
|
|
'valuetype' => 'text', |
134
|
|
|
'default' => 'xotheme', |
135
|
|
|
'options' => [ |
136
|
|
|
_MI_MYMENUS_CONF_ASSIGN_METHOD_XOOPSTPL => 'xoopstpl', |
137
|
|
|
_MI_MYMENUS_CONF_ASSIGN_METHOD_XOTHEME => 'xotheme' |
138
|
|
|
] |
139
|
|
|
]; |
140
|
|
|
$modversion['config'][] = [ |
141
|
|
|
'name' => 'unique_id_prefix', |
142
|
|
|
'title' => '_MI_MYMENUS_CONF_UNIQUE_ID_PREFIX', |
143
|
|
|
'description' => '_MI_MYMENUS_CONF_UNIQUE_ID_PREFIX_DSC', |
144
|
|
|
'formtype' => 'text', |
145
|
|
|
'valuetype' => 'text', |
146
|
|
|
'default' => 'xoops_menu_' |
147
|
|
|
]; |
148
|
|
|
|