-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathxoops_version.php
More file actions
147 lines (133 loc) · 5.79 KB
/
xoops_version.php
File metadata and controls
147 lines (133 loc) · 5.79 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
<?php
/*
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 XOOPS Project (https://xoops.org)
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU Public License
* @package Mymenus
* @since 1.0
* @author trabis <lusopoemas@gmail.com>, bleekk <bleekk@outlook.com>
*/
defined('XOOPS_ROOT_PATH') || die('Restricted access');
require __DIR__ . '/preloads/autoloader.php';
$moduleDirName = basename(__DIR__);
// ------------------- Informations ------------------- //
$modversion = [
'version' => 1.54,
'module_status' => 'Beta 2',
'release_date' => '2018/07/20', // YYYY/mm/dd
'name' => _MI_MYMENUS_MD_NAME,
'description' => _MI_MYMENUS_MD_DESC,
'author' => 'Trabis (www.xuups.com), contributors: Mamba, Bleek, Zyspec, Luciorota',
// 'author_mail' => " ",
'author_website_url' => 'http://xuups.com',
'author_website_name' => 'XUUPS',
'credits' => 'XOOPS Development Team',
'license' => 'GPL 2.0 or later',
'license_url' => 'www.gnu.org/licenses/gpl-2.0.html/',
'help' => 'page=help',
'release_info' => 'release_info',
'release' => '2017-07-20',
'release_file' => XOOPS_URL . "/modules/{$moduleDirName}/docs/release_info file",
'manual' => 'link to manual file',
'manual_file' => XOOPS_URL . "/modules/{$moduleDirName}/docs/install.txt",
'min_php' => '5.6',
'min_xoops' => '2.5.9',
'min_admin' => '1.2',
'min_db' => ['mysql' => '5.5'],
'image' => 'assets/images/logoModule.png', // Path and name of the module’s logo
'official' => 1, //1 indicates supported by XOOPS Dev Team, 0 means 3rd party supported
'dirname' => $moduleDirName,
// Local icons paths
'modicons16' => 'assets/images/icons/16',
'modicons32' => 'assets/images/icons/32',
'demo_site_url' => 'https://xoops.org',
'demo_site_name' => 'XOOPS Demo Site',
'support_url' => 'https://xoops.org/modules/newbb',
'support_name' => 'Support Forum',
'module_website_url' => 'www.xoops.org',
'module_website_name' => 'XOOPS Project',
// Admin things
'hasAdmin' => 1,
'system_menu' => 1,
'adminindex' => 'admin/index.php',
'adminmenu' => 'admin/menu.php',
// Main Menu
'hasMain' => 0,
// Install/Update
//'onInstall' => "include/oninstall.php",
//'onUninstall' => "include/onuninstall.php",
'onUpdate' => 'include/onupdate.php',
// Search
'hasSearch' => 0,
// Comments
'hasComments' => 0,
// Notification
'hasNotification' => 0
];
require XOOPS_ROOT_PATH . '/modules/' . $modversion['dirname'] . '/include/constants.php';
// ------------------- Help files ------------------- //
$modversion['helpsection'] = [
['name' => _MI_MYMENUS_HELP_OVERVIEW, 'link' => 'page=help'],
['name' => _MI_MYMENUS_HELP_SKINS, 'link' => 'page=skins'],
['name' => _MI_MYMENUS_HELP_USAGE, 'link' => 'page=usage'],
['name' => _MI_MYMENUS_DISCLAIMER, 'link' => 'page=disclaimer'],
['name' => _MI_MYMENUS_LICENSE, 'link' => 'page=license'],
['name' => _MI_MYMENUS_SUPPORT, 'link' => 'page=support'],
];
// ------------------- Mysql ------------------- //
// Sql file (must contain sql generated by phpMyAdmin or phpPgAdmin)
// All tables should not have any prefix!
$modversion['sqlfile']['mysql'] = 'sql/mysql.sql';
// Tables created by sql file (without prefix!)
$modversion['tables'] = [
$moduleDirName . '_links',
$moduleDirName . '_menus'
];
// ------------------- Blocks ------------------- //
$modversion['blocks'][] = [
'file' => $moduleDirName . '_block.php',
'name' => _MI_MYMENUS_BLK,
'description' => _MI_MYMENUS_BLK_DSC,
'show_func' => $moduleDirName . '_block_show',
'edit_func' => $moduleDirName . '_block_edit',
'options' => '0|default|0|block||', // mid|moduleSkin|useThemeSkin|displayMethod|unique_id|themeSkin
'template' => $moduleDirName . '_block.tpl'
];
// ------------------- Templates ------------------- //
// ------------------- Config ------------------- //
$modversion['config'][] = [
'name' => 'admin_perpage',
'title' => '_MI_MYMENUS_CONF_ADMINPERPAGE',
'description' => '_MI_MYMENUS_CONF_ADMINPERPAGE_DSC',
'formtype' => 'select',
'valuetype' => 'int',
'default' => '10',
'options' => ['5' => 5, '10' => 10, '15' => 15, '20' => 20, '25' => 25, '30' => 30, '50' => 50]
];
$modversion['config'][] = [
'name' => 'assign_method',
'title' => '_MI_MYMENUS_CONF_ASSIGN_METHOD',
'description' => '_MI_MYMENUS_CONF_ASSIGN_METHOD_DSC',
'formtype' => 'select',
'valuetype' => 'text',
'default' => 'xotheme',
'options' => [
_MI_MYMENUS_CONF_ASSIGN_METHOD_XOOPSTPL => 'xoopstpl',
_MI_MYMENUS_CONF_ASSIGN_METHOD_XOTHEME => 'xotheme'
]
];
$modversion['config'][] = [
'name' => 'unique_id_prefix',
'title' => '_MI_MYMENUS_CONF_UNIQUE_ID_PREFIX',
'description' => '_MI_MYMENUS_CONF_UNIQUE_ID_PREFIX_DSC',
'formtype' => 'text',
'valuetype' => 'text',
'default' => 'xoops_menu_'
];