1
|
|
|
<?php declare(strict_types=1);
|
2
|
|
|
/*
|
3
|
|
|
You may not change or alter any portion of this comment or credits of
|
4
|
|
|
supporting developers from this source code or any supporting source code
|
5
|
|
|
which is considered copyrighted (c) material of the original comment or credit
|
6
|
|
|
authors.
|
7
|
|
|
|
8
|
|
|
This program is distributed in the hope that it will be useful, but
|
9
|
|
|
WITHOUT ANY WARRANTY; without even the implied warranty of
|
10
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
11
|
|
|
*/
|
12
|
|
|
|
13
|
|
|
/**
|
14
|
|
|
* Administration Menu for the Xoops FAQ Module
|
15
|
|
|
*
|
16
|
|
|
* @author John Neill
|
17
|
|
|
* @author XOOPS Module Development Team
|
18
|
|
|
* @copyright Copyright (c) 2001-2017 {@link https://xoops.org XOOPS Project}
|
19
|
|
|
* @license https://www.gnu.org/licenses/gpl-2.0.html GNU Public License
|
20
|
|
|
* @since :: 1.23
|
21
|
|
|
*
|
22
|
|
|
* @see \Xmf\Module\Admin
|
23
|
|
|
*/
|
24
|
|
|
|
25
|
|
|
use Xmf\Module\Admin;
|
26
|
|
|
use XoopsModules\Xoopsfaq\{
|
27
|
|
|
Helper
|
28
|
|
|
};
|
29
|
|
|
|
30
|
|
|
require \dirname(__DIR__) . '/preloads/autoloader.php';
|
31
|
|
|
|
32
|
|
|
/** @var \XoopsModules\Xoopsfaq\Helper $helper */
|
33
|
|
|
$moduleDirName = \basename(\dirname(__DIR__));
|
34
|
|
|
$moduleDirNameUpper = \mb_strtoupper($moduleDirName);
|
35
|
|
|
|
36
|
|
|
$helper = Helper::getInstance();
|
37
|
|
|
$helper->loadLanguage('modinfo');
|
38
|
|
|
$helper->loadLanguage('common');
|
39
|
|
|
|
40
|
|
|
// get path to icons
|
41
|
|
|
$pathModIcon32 = XOOPS_URL . '/modules/' . $moduleDirName . '/assets/images/icons/32/';
|
42
|
|
|
if (is_object($helper->getModule()) && false !== $helper->getModule()->getInfo('modicons32')) {
|
43
|
|
|
$pathModIcon32 = $helper->url($helper->getModule()->getInfo('modicons32'));
|
|
|
|
|
44
|
|
|
}
|
45
|
|
|
|
46
|
|
|
$adminmenu[] = [
|
47
|
|
|
'title' => _MI_XOOPSFAQ_MENU_ADMIN_INDEX,
|
48
|
|
|
'link' => 'admin/index.php',
|
49
|
|
|
'desc' => _MI_XOOPSFAQ_ADMIN_INDEX_DESC,
|
50
|
|
|
'icon' => Admin::menuIconPath('home.png'),
|
51
|
|
|
];
|
52
|
|
|
|
53
|
|
|
$adminmenu[] = [
|
54
|
|
|
'title' => _MI_XOOPSFAQ_MENU_ADMIN_CATEGORY,
|
55
|
|
|
'link' => 'admin/category.php',
|
56
|
|
|
'desc' => _MI_XOOPSFAQ_ADMIN_CATEGORY_DESC,
|
57
|
|
|
'icon' => Admin::menuIconPath('category.png'),
|
58
|
|
|
];
|
59
|
|
|
|
60
|
|
|
$adminmenu[] = [
|
61
|
|
|
'title' => _MI_XOOPSFAQ_MENU_ADMIN_FAQ,
|
62
|
|
|
'link' => 'admin/main.php',
|
63
|
|
|
'desc' => _MI_XOOPSFAQ_ADMIN_FAQ_DESC,
|
64
|
|
|
'icon' => Admin::menuIconPath('mail_foward.png'),
|
65
|
|
|
];
|
66
|
|
|
|
67
|
|
|
if (is_object($helper->getModule()) && $helper->getConfig('displayDeveloperTools')) {
|
68
|
|
|
$adminmenu[] = [
|
69
|
|
|
'title' => _MI_XOOPSFAQ_MENU_ADMIN_MIGRATE,
|
70
|
|
|
'link' => 'admin/migrate.php',
|
71
|
|
|
'icon' => Admin::menuIconPath('database_go.png'),
|
72
|
|
|
];
|
73
|
|
|
}
|
74
|
|
|
|
75
|
|
|
$adminmenu[] = [
|
76
|
|
|
'title' => _MI_XOOPSFAQ_MENU_ADMIN_ABOUT,
|
77
|
|
|
'link' => 'admin/about.php',
|
78
|
|
|
'desc' => _MI_XOOPSFAQ_ADMIN_ABOUT_DESC,
|
79
|
|
|
'icon' => Admin::menuIconPath('about.png'),
|
80
|
|
|
];
|
81
|
|
|
|