1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
declare(strict_types=1); |
4
|
|
|
|
5
|
|
|
/** |
6
|
|
|
* **************************************************************************** |
7
|
|
|
* GBOOK - MODULE FOR XOOPS |
8
|
|
|
* Copyright (c) 2007 - 2012 |
9
|
|
|
* Ingo H. de Boer (http://www.winshell.org) |
10
|
|
|
* |
11
|
|
|
* This program is free software; you can redistribute it and/or modify |
12
|
|
|
* it under the terms of the GNU General Public License as published by |
13
|
|
|
* the Free Software Foundation; either version 2 of the License, or |
14
|
|
|
* (at your option) any later version. |
15
|
|
|
* |
16
|
|
|
* You may not change or alter any portion of this comment or credits |
17
|
|
|
* of supporting developers from this source code or any supporting |
18
|
|
|
* source code which is considered copyrighted (c) material of the |
19
|
|
|
* original comment or credit authors. |
20
|
|
|
* |
21
|
|
|
* This program is distributed in the hope that it will be useful, |
22
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
23
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
24
|
|
|
* GNU General Public License for more details. |
25
|
|
|
* --------------------------------------------------------------------------- |
26
|
|
|
* @copyright Ingo H. de Boer (http://www.winshell.org) |
27
|
|
|
* @license GNU General Public License (GPL) |
28
|
|
|
* @package GBook |
29
|
|
|
* @author Ingo H. de Boer ([email protected]) |
30
|
|
|
* |
31
|
|
|
* **************************************************************************** |
32
|
|
|
*/ |
33
|
|
|
|
34
|
|
|
use Xmf\Module\Admin; |
35
|
|
|
use XoopsModules\Gbook; |
36
|
|
|
/** @var Gbook\Helper $helper */ |
37
|
|
|
|
38
|
|
|
$moduleDirName = \basename(\dirname(__DIR__)); |
39
|
|
|
$moduleDirNameUpper = mb_strtoupper($moduleDirName); |
40
|
|
|
|
41
|
|
|
$helper = Gbook\Helper::getInstance(); |
42
|
|
|
$helper->loadLanguage('common'); |
43
|
|
|
$helper->loadLanguage('feedback'); |
44
|
|
|
|
45
|
|
|
$pathIcon32 = Admin::menuIconPath(''); |
46
|
|
|
$pathModIcon32 = XOOPS_URL . '/modules/' . $moduleDirName . '/assets/images/icons/32/'; |
47
|
|
|
if (is_object($helper->getModule()) && false !== $helper->getModule()->getInfo('modicons32')) { |
48
|
|
|
$pathModIcon32 = $helper->url($helper->getModule()->getInfo('modicons32')); |
|
|
|
|
49
|
|
|
} |
50
|
|
|
|
51
|
|
|
$adminmenu[] = [ |
52
|
|
|
'title' => _MI_GBOOK_HOME, |
53
|
|
|
'link' => 'admin/index.php', |
54
|
|
|
'icon' => $pathIcon32 . '/home.png', |
55
|
|
|
]; |
56
|
|
|
|
57
|
|
|
$adminmenu[] = [ |
58
|
|
|
'title' => _MI_GBOOK_MANAGE_ENTRIES, |
59
|
|
|
'link' => 'admin/entries.php', |
60
|
|
|
'icon' => $pathIcon32 . '/manage.png', |
61
|
|
|
]; |
62
|
|
|
|
63
|
|
|
$adminmenu[] = [ |
64
|
|
|
'title' => _MI_GBOOK_ABOUT, |
65
|
|
|
'link' => 'admin/about.php', |
66
|
|
|
'icon' => $pathIcon32 . '/about.png', |
67
|
|
|
]; |
68
|
|
|
|