|
1
|
|
|
<?php declare(strict_types=1); |
|
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 https://www.fsf.org/copyleft/gpl.html GNU public license |
|
15
|
|
|
* @since 1.0 |
|
16
|
|
|
* @author trabis <[email protected]> |
|
17
|
|
|
* @author The SmartFactory <www.smartfactory.ca> |
|
18
|
|
|
*/ |
|
19
|
|
|
|
|
20
|
|
|
use Xmf\Module\Admin; |
|
21
|
|
|
use XoopsModules\Publisher\Helper; |
|
22
|
|
|
|
|
23
|
|
|
require_once \dirname(__DIR__) . '/preloads/autoloader.php'; |
|
24
|
|
|
|
|
25
|
|
|
$moduleDirName = \basename(\dirname(__DIR__)); |
|
26
|
|
|
$moduleDirNameUpper = \mb_strtoupper($moduleDirName); |
|
27
|
|
|
|
|
28
|
|
|
$helper = Helper::getInstance(); |
|
29
|
|
|
$helper->loadLanguage('common'); |
|
30
|
|
|
$helper->loadLanguage('feedback'); |
|
31
|
|
|
|
|
32
|
|
|
// get path to icons |
|
33
|
|
|
$pathIcon32 = Admin::menuIconPath(''); |
|
34
|
|
|
$pathModIcon32 = $helper->getModule() |
|
35
|
|
|
->getInfo('modicons32'); |
|
36
|
|
|
|
|
37
|
|
|
$adminmenu[] = [ |
|
38
|
|
|
'title' => _MI_PUBLISHER_ADMENU0, |
|
39
|
|
|
'link' => 'admin/index.php', |
|
40
|
|
|
'icon' => $pathIcon32 . '/home.png', |
|
41
|
|
|
]; |
|
42
|
|
|
|
|
43
|
|
|
$adminmenu[] = [ |
|
44
|
|
|
'title' => _MI_PUBLISHER_ADMENU1, |
|
45
|
|
|
'link' => 'admin/main.php', |
|
46
|
|
|
'icon' => $pathIcon32 . '/manage.png', |
|
47
|
|
|
]; |
|
48
|
|
|
|
|
49
|
|
|
// Category |
|
50
|
|
|
|
|
51
|
|
|
$adminmenu[] = [ |
|
52
|
|
|
'title' => _MI_PUBLISHER_ADMENU2, |
|
53
|
|
|
'link' => 'admin/category.php', |
|
54
|
|
|
'icon' => $pathIcon32 . '/category.png', |
|
55
|
|
|
]; |
|
56
|
|
|
|
|
57
|
|
|
// Items |
|
58
|
|
|
$adminmenu[] = [ |
|
59
|
|
|
'title' => _MI_PUBLISHER_ADMENU3, |
|
60
|
|
|
'link' => 'admin/item.php', |
|
61
|
|
|
'icon' => $pathIcon32 . '/content.png', |
|
62
|
|
|
]; |
|
63
|
|
|
|
|
64
|
|
|
// Trello |
|
65
|
|
|
$adminmenu[] = [ |
|
66
|
|
|
'title' => _MI_PUBLISHER_ADMENU7, |
|
67
|
|
|
'link' => 'admin/trello.php', |
|
68
|
|
|
'icon' => $pathIcon32 . '/extention.png', |
|
69
|
|
|
]; |
|
70
|
|
|
|
|
71
|
|
|
// Permissions |
|
72
|
|
|
$adminmenu[] = [ |
|
73
|
|
|
'title' => _MI_PUBLISHER_ADMENU4, |
|
74
|
|
|
'link' => 'admin/permissions.php', |
|
75
|
|
|
'icon' => $pathIcon32 . '/permissions.png', |
|
76
|
|
|
]; |
|
77
|
|
|
|
|
78
|
|
|
// Blocks Admin |
|
79
|
|
|
$adminmenu[] = [ |
|
80
|
|
|
'title' => _MI_PUBLISHER_ADMENU5, |
|
81
|
|
|
'link' => 'admin/blocksadmin.php', |
|
82
|
|
|
'icon' => $pathIcon32 . '/block.png', |
|
83
|
|
|
]; |
|
84
|
|
|
// Mimetypes |
|
85
|
|
|
$adminmenu[] = [ |
|
86
|
|
|
'title' => _MI_PUBLISHER_ADMENU6, |
|
87
|
|
|
'link' => 'admin/mimetypes.php', |
|
88
|
|
|
'icon' => $pathIcon32 . '/type.png', |
|
89
|
|
|
]; |
|
90
|
|
|
|
|
91
|
|
|
//$adminmenu[] = [ |
|
92
|
|
|
|
|
93
|
|
|
// Preferences |
|
94
|
|
|
// array( |
|
95
|
|
|
// 'title' => _PREFERENCES, |
|
96
|
|
|
// 'link' => 'admin/preferences.php', |
|
97
|
|
|
// 'icon' => '../../' . $pathIcon32 . '/administration.png'), |
|
98
|
|
|
|
|
99
|
|
|
/* |
|
100
|
|
|
//Comments |
|
101
|
|
|
array( |
|
102
|
|
|
"title" => _AM_PUBLISHER_COMMENTS, |
|
103
|
|
|
"link" => '../../modules/system/admin.php?fct=comments&module=' . $module->getVar('mid'), |
|
104
|
|
|
"icon" => './assets/images/icon32/folder_txt.png'), |
|
105
|
|
|
*/ |
|
106
|
|
|
|
|
107
|
|
|
//]; |
|
108
|
|
|
//Import |
|
109
|
|
|
$adminmenu[] = [ |
|
110
|
|
|
'title' => _MI_PUBLISHER_IMPORT, |
|
111
|
|
|
'link' => 'admin/import.php', |
|
112
|
|
|
'icon' => $pathIcon32 . '/download.png', |
|
113
|
|
|
]; |
|
114
|
|
|
|
|
115
|
|
|
//Clone |
|
116
|
|
|
$adminmenu[] = [ |
|
117
|
|
|
'title' => _MI_PUBLISHER_MENU_CLONE, |
|
118
|
|
|
'link' => 'admin/clone.php', |
|
119
|
|
|
'icon' => $pathModIcon32 . '/editcopy.png', |
|
|
|
|
|
|
120
|
|
|
]; |
|
121
|
|
|
|
|
122
|
|
|
// [ |
|
123
|
|
|
// 'title' => _MI_PUBLISHER_MENU_HISTORY, |
|
124
|
|
|
// 'link' => 'admin/history.php', |
|
125
|
|
|
// 'icon' => $pathModIcon32 . '/editcopy.png' |
|
126
|
|
|
// ], |
|
127
|
|
|
|
|
128
|
|
|
//Feedback |
|
129
|
|
|
$adminmenu[] = [ |
|
130
|
|
|
'title' => constant('CO_' . $moduleDirNameUpper . '_' . 'ADMENU_FEEDBACK'), |
|
131
|
|
|
'link' => 'admin/feedback.php', |
|
132
|
|
|
'icon' => $pathIcon32 . '/mail_foward.png', |
|
133
|
|
|
]; |
|
134
|
|
|
|
|
135
|
|
|
if (is_object($helper->getModule()) && $helper->getConfig('displayDeveloperTools')) { |
|
136
|
|
|
$adminmenu[] = [ |
|
137
|
|
|
'title' => constant('CO_' . $moduleDirNameUpper . '_' . 'ADMENU_MIGRATE'), |
|
138
|
|
|
'link' => 'admin/migrate.php', |
|
139
|
|
|
'icon' => $pathIcon32 . '/database_go.png', |
|
140
|
|
|
]; |
|
141
|
|
|
} |
|
142
|
|
|
|
|
143
|
|
|
//About |
|
144
|
|
|
$adminmenu[] = [ |
|
145
|
|
|
'title' => _MI_PUBLISHER_ABOUT, |
|
146
|
|
|
'link' => 'admin/about.php', |
|
147
|
|
|
'icon' => $pathIcon32 . '/about.png', |
|
148
|
|
|
]; |
|
149
|
|
|
|
|
150
|
|
|
$GLOBALS['xoTheme']->addStylesheet('modules/' . $moduleDirName . '/assets/css/style.css'); |
|
151
|
|
|
|