|
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 {@link https://xoops.org/ XOOPS Project} |
|
14
|
|
|
* @license {@link https://www.gnu.org/licenses/gpl-2.0.html GNU GPL 2 or later} |
|
15
|
|
|
* @author XOOPS Development Team |
|
16
|
|
|
*/ |
|
17
|
|
|
defined('XOOPS_ROOT_PATH') || exit('Restricted access'); |
|
18
|
|
|
|
|
19
|
|
|
require_once __DIR__ . '/preloads/autoloader.php'; |
|
20
|
|
|
|
|
21
|
|
|
$moduleDirName = basename(__DIR__); |
|
22
|
|
|
$moduleDirNameUpper = \mb_strtoupper($moduleDirName); |
|
23
|
|
|
|
|
24
|
|
|
$modversion = [ |
|
25
|
|
|
'version' => '1.12.0', |
|
26
|
|
|
'module_status' => 'RC 2', |
|
27
|
|
|
'release_date' => ''2022/02/20', |
|
|
|
|
|
|
28
|
|
|
'name' => _MI_XOOPSHEADLINE_NAME, |
|
29
|
|
|
'description' => _MI_XOOPSHEADLINE_DESC, |
|
30
|
|
|
'official' => 1, // maintained by XOOPS Module Development Team |
|
31
|
|
|
'author' => 'Kazumi Ono ( https://xoops.org/ https://www.myweb.ne.jp/ )', |
|
32
|
|
|
'credits' => 'The Xoops Module Development Team', |
|
33
|
|
|
'license' => 'GNU GPL 2.0', |
|
34
|
|
|
'license_url' => 'www.gnu.org/licenses/gpl-2.0.html/', |
|
35
|
|
|
'help' => 'page=help', |
|
36
|
|
|
'image' => 'assets/images/logoModule.png', |
|
37
|
|
|
'dirname' => $moduleDirName, |
|
38
|
|
|
//about |
|
39
|
|
|
'author_website_url' => 'https://xoops.org', |
|
40
|
|
|
'author_website_name' => 'XOOPS', |
|
41
|
|
|
'module_website_url' => 'https://xoops.org', |
|
42
|
|
|
'module_website_name' => 'XOOPS', |
|
43
|
|
|
'min_php' => '7.4', |
|
44
|
|
|
'min_xoops' => '2.5.10', |
|
45
|
|
|
'min_db' => ['mysql' => '5.5'], |
|
46
|
|
|
'min_admin' => '1.2', |
|
47
|
|
|
'modicons16' => 'assets/images/icons/16', |
|
48
|
|
|
'modicons32' => 'assets/images/icons/32', |
|
49
|
|
|
]; |
|
50
|
|
|
|
|
51
|
|
|
// Sql file (must contain sql generated by phpMyAdmin or phpPgAdmin) |
|
52
|
|
|
// All tables should not have any prefix! |
|
53
|
|
|
$modversion['sqlfile']['mysql'] = 'sql/mysql.sql'; |
|
54
|
|
|
//$modversion['sqlfile']['mysqli'] = "sql/mysql.sql"; |
|
55
|
|
|
//$modversion['sqlfile']['postgresql'] = "sql/pgsql.sql"; |
|
56
|
|
|
|
|
57
|
|
|
// Tables created by sql file (without prefix!) |
|
58
|
|
|
$modversion['tables'][0] = 'xoopsheadline'; |
|
59
|
|
|
|
|
60
|
|
|
// Config Options |
|
61
|
|
|
$modversion['config'][] = [ |
|
62
|
|
|
'name' => 'sortby', |
|
63
|
|
|
'title' => '_MI_XOOPSHEADLINE_SORTORDER', |
|
64
|
|
|
'description' => '_MI_XOOPSHEADLINE_SORTORDERDSC', |
|
65
|
|
|
'formtype' => 'select', |
|
66
|
|
|
'valuetype' => 'text', |
|
67
|
|
|
'default' => 4, |
|
68
|
|
|
'options' => [ |
|
69
|
|
|
'_MI_XOOPSHEADLINE_SORT1' => 1, |
|
70
|
|
|
'_MI_XOOPSHEADLINE_SORT2' => 2, |
|
71
|
|
|
'_MI_XOOPSHEADLINE_SORT3' => 3, |
|
72
|
|
|
'_MI_XOOPSHEADLINE_SORT4' => 4, |
|
73
|
|
|
], |
|
74
|
|
|
]; |
|
75
|
|
|
|
|
76
|
|
|
/** |
|
77
|
|
|
* Make Sample button visible? |
|
78
|
|
|
*/ |
|
79
|
|
|
$modversion['config'][] = [ |
|
80
|
|
|
'name' => 'displaySampleButton', |
|
81
|
|
|
'title' => 'CO_' . $moduleDirNameUpper . '_' . 'SHOW_SAMPLE_BUTTON', |
|
82
|
|
|
'description' => 'CO_' . $moduleDirNameUpper . '_' . 'SHOW_SAMPLE_BUTTON_DESC', |
|
83
|
|
|
'formtype' => 'yesno', |
|
84
|
|
|
'valuetype' => 'int', |
|
85
|
|
|
'default' => 1, |
|
86
|
|
|
]; |
|
87
|
|
|
|
|
88
|
|
|
/** |
|
89
|
|
|
* Show Developer Tools? |
|
90
|
|
|
*/ |
|
91
|
|
|
$modversion['config'][] = [ |
|
92
|
|
|
'name' => 'displayDeveloperTools', |
|
93
|
|
|
'title' => 'CO_' . $moduleDirNameUpper . '_' . 'SHOW_DEV_TOOLS', |
|
94
|
|
|
'description' => 'CO_' . $moduleDirNameUpper . '_' . 'SHOW_DEV_TOOLS_DESC', |
|
95
|
|
|
'formtype' => 'yesno', |
|
96
|
|
|
'valuetype' => 'int', |
|
97
|
|
|
'default' => 0, |
|
98
|
|
|
]; |
|
99
|
|
|
|
|
100
|
|
|
// Admin |
|
101
|
|
|
$modversion['hasAdmin'] = 1; |
|
102
|
|
|
$modversion['adminindex'] = 'admin/index.php'; |
|
103
|
|
|
$modversion['adminmenu'] = 'admin/menu.php'; |
|
104
|
|
|
|
|
105
|
|
|
// Set to 1 if you want to display menu generated by system module |
|
106
|
|
|
$modversion['system_menu'] = 1; |
|
107
|
|
|
|
|
108
|
|
|
// ------------------- Help files ------------------- // |
|
109
|
|
|
$modversion['helpsection'] = [ |
|
110
|
|
|
['name' => _MI_XOOPSHEADLINE_OVERVIEW, 'link' => 'page=help'], |
|
111
|
|
|
['name' => _MI_XOOPSHEADLINE_DISCLAIMER, 'link' => 'page=disclaimer'], |
|
112
|
|
|
['name' => _MI_XOOPSHEADLINE_LICENSE, 'link' => 'page=license'], |
|
113
|
|
|
['name' => _MI_XOOPSHEADLINE_SUPPORT, 'link' => 'page=support'], |
|
114
|
|
|
]; |
|
115
|
|
|
|
|
116
|
|
|
// ------------------- Blocks ------------------- // |
|
117
|
|
|
$modversion['blocks'][] = [ |
|
118
|
|
|
'file' => 'headline.php', |
|
119
|
|
|
'name' => _MI_XOOPSHEADLINE_BNAME, |
|
120
|
|
|
'description' => 'Shows headline news via RDF/RSS news feed', |
|
121
|
|
|
'show_func' => 'b_xoopsheadline_show', |
|
122
|
|
|
'template' => 'xoopsheadline_block_rss.tpl', |
|
123
|
|
|
]; |
|
124
|
|
|
|
|
125
|
|
|
// Menu |
|
126
|
|
|
$modversion['hasMain'] = 1; |
|
127
|
|
|
|
|
128
|
|
|
// ------------------- Templates ------------------- // |
|
129
|
|
|
$modversion['templates'] = [ |
|
130
|
|
|
['file' => 'xoopsheadline_index.tpl', 'description' => ''], |
|
131
|
|
|
['file' => 'xoopsheadline_feed.tpl', 'description' => ''], |
|
132
|
|
|
['file' => 'blocks/headline_block.tpl', 'description' => ''], |
|
133
|
|
|
]; |
|
134
|
|
|
|