1 | <?php |
||||
2 | /************************************************************************/ |
||||
3 | /* Donations - Paypal financial management module for Xoops 2 */ |
||||
4 | /* Copyright (c) 2016 XOOPS Project */ |
||||
5 | /* http://dev.xoops.org/modules/xfmod/project/?group_id=1060 */ |
||||
6 | /* |
||||
7 | /************************************************************************/ |
||||
8 | /* */ |
||||
9 | /* Based on NukeTreasury for PHP-Nuke - by Dave Lawrence AKA Thrash */ |
||||
10 | /* NukeTreasury - Financial management for PHP-Nuke */ |
||||
11 | /* Copyright (c) 2004 by Dave Lawrence AKA Thrash */ |
||||
12 | /* [email protected] */ |
||||
13 | /* [email protected] */ |
||||
14 | /* */ |
||||
15 | /************************************************************************/ |
||||
16 | /* */ |
||||
17 | /* This program is free software; you can redistribute it and/or modify */ |
||||
18 | /* it under the terms of the GNU General Public License as published by */ |
||||
19 | /* the Free Software Foundation; either version 2 of the License. */ |
||||
20 | /* */ |
||||
21 | /* This program is distributed in the hope that it will be useful, but */ |
||||
22 | /* WITHOUT ANY WARRANTY; without even the implied warranty of */ |
||||
23 | /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU */ |
||||
24 | /* General Public License for more details. */ |
||||
25 | /* */ |
||||
26 | /* You should have received a copy of the GNU General Public License */ |
||||
27 | /* along with this program; if not, write to the Free Software */ |
||||
28 | /* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 */ |
||||
29 | /* USA */ |
||||
30 | /************************************************************************/ |
||||
31 | |||||
32 | require_once __DIR__ . '/preloads/autoloader.php'; |
||||
33 | |||||
34 | $moduleDirName = basename(__DIR__); |
||||
35 | |||||
36 | $modversion['version'] = '2.00'; |
||||
37 | $modversion['module_status'] = 'Beta 2'; |
||||
38 | $modversion['release_date'] = '2017/05/25'; |
||||
39 | $modversion['name'] = _MI_XDONATION_NAME; |
||||
40 | $modversion['description'] = _MI_XDONATION_DESC; |
||||
41 | $modversion['author'] = 'XOOPS Development Team, zyspec ([email protected]), Mamba'; |
||||
42 | $modversion['credits'] = 'Based on NukeTreasury for PHP-Nuke.<br>Xoops2 port maintained by the Xoops2 Donations Module Dev Team.'; |
||||
43 | $modversion['help'] = 'page=help'; |
||||
44 | $modversion['license'] = 'GNU GPL 2.0'; |
||||
45 | $modversion['license_url'] = 'www.gnu.org/licenses/gpl-2.0.html'; |
||||
46 | $modversion['official'] = 0; //1 indicates supported by XOOPS Dev Team, 0 means 3rd party supported |
||||
47 | $modversion['image'] = 'assets/images/logoModule.png'; |
||||
48 | $modversion['dirname'] = basename(__DIR__);//$xdonDir; |
||||
49 | $modversion['modicons16'] = 'assets/images/icons/16'; |
||||
50 | $modversion['modicons32'] = 'assets/images/icons/32'; |
||||
51 | $modversion['release_file'] = XOOPS_URL . '/modules/' . $modversion['dirname'] . '/docs/changelog.txt'; |
||||
0 ignored issues
–
show
Bug
introduced
by
![]() |
|||||
52 | $modversion['module_website_url'] = 'www.xoops.org/'; |
||||
53 | $modversion['module_website_name'] = 'XOOPS'; |
||||
54 | $modversion['release'] = '2016-04-05'; |
||||
55 | $modversion['author_website_url'] = 'https://xoops.org/'; |
||||
56 | $modversion['author_website_name'] = 'XOOPS'; |
||||
57 | $modversion['min_php'] = '5.6'; |
||||
58 | $modversion['min_xoops'] = '2.5.9'; |
||||
59 | $modversion['min_admin'] = '1.2'; |
||||
60 | $modversion['min_db'] = ['mysql' => '5.5']; |
||||
61 | |||||
62 | // ------------------- Help files ------------------- // |
||||
63 | $modversion['helpsection'] = [ |
||||
64 | ['name' => _MI_XDONATION_OVERVIEW, 'link' => 'page=help'], |
||||
65 | ['name' => _MI_XDONATION_DISCLAIMER, 'link' => 'page=disclaimer'], |
||||
66 | ['name' => _MI_XDONATION_LICENSE, 'link' => 'page=license'], |
||||
67 | ['name' => _MI_XDONATION_SUPPORT, 'link' => 'page=support'], |
||||
68 | ]; |
||||
69 | // Run Script After Installation |
||||
70 | $modversion['onInstall'] = 'include/installscript.php'; |
||||
71 | |||||
72 | // Run Script On Update |
||||
73 | $modversion['onUpdate'] = 'include/onupdate.php'; |
||||
74 | |||||
75 | // Run Script On Module Removal |
||||
76 | $modversion['onUninstall'] = 'include/uninstallscript.php'; |
||||
77 | |||||
78 | // Sql file (must contain sql generated by phpMyAdmin or phpPgAdmin) |
||||
79 | // All tables should not have any prefix! |
||||
80 | $modversion['sqlfile']['mysql'] = 'sql/mysql.sql'; |
||||
81 | |||||
82 | // Tables created by sql file (without prefix!) |
||||
83 | $modversion['tables'][0] = 'donations_config'; |
||||
84 | $modversion['tables'][1] = 'donations_financial'; |
||||
85 | $modversion['tables'][2] = 'donations_transactions'; |
||||
86 | $modversion['tables'][3] = 'donations_translog'; |
||||
87 | |||||
88 | // Admin things |
||||
89 | $modversion['hasAdmin'] = 1; |
||||
90 | $modversion['adminindex'] = 'admin/index.php'; |
||||
91 | $modversion['adminmenu'] = 'admin/menu.php'; |
||||
92 | $modversion['system_menu'] = 1; |
||||
93 | |||||
94 | // Blocks |
||||
95 | $modversion['blocks'][1]['file'] = 'donat_o_meter.php'; |
||||
96 | $modversion['blocks'][1]['name'] = _MI_XDONATION_BNAME1; |
||||
97 | $modversion['blocks'][1]['description'] = _MI_XDONATION_BNAME1_DESC; |
||||
98 | $modversion['blocks'][1]['show_func'] = 'b_donations_donatometer_show'; |
||||
99 | $modversion['blocks'][1]['options'] = '10|1|0|' . _MI_XDONATION_BUTTON_URL . '|110|23'; |
||||
100 | $modversion['blocks'][1]['edit_func'] = 'b_donations_donatometer_edit'; |
||||
101 | $modversion['blocks'][1]['template'] = 'donations_donatometer.tpl'; |
||||
102 | |||||
103 | $modversion['blocks'][2]['file'] = 'donate.php'; |
||||
104 | $modversion['blocks'][2]['name'] = _MI_XDONATION_BNAME2; |
||||
105 | $modversion['blocks'][2]['description'] = _MI_XDONATION_BNAME2_DESC; |
||||
106 | $modversion['blocks'][2]['show_func'] = 'b_donations_donate_show'; |
||||
107 | $modversion['blocks'][2]['template'] = 'donations_donate.tpl'; |
||||
108 | |||||
109 | $modversion['blocks'][3]['file'] = 'donors.php'; |
||||
110 | $modversion['blocks'][3]['name'] = _MI_XDONATION_BNAME3; |
||||
111 | $modversion['blocks'][3]['description'] = _MI_XDONATION_BNAME3_DESC; |
||||
112 | $modversion['blocks'][3]['show_func'] = 'b_donations_donors_show'; |
||||
113 | $modversion['blocks'][3]['options'] = '10|1|0'; |
||||
114 | $modversion['blocks'][3]['edit_func'] = 'b_donations_donors_edit'; |
||||
115 | $modversion['blocks'][3]['template'] = 'donations_donors.tpl'; |
||||
116 | |||||
117 | // Menu |
||||
118 | $modversion['hasMain'] = 1; |
||||
119 | |||||
120 | global $xoopsUser, $xoopsDB, $xoopsModule, $xoopsModuleConfig; |
||||
121 | $hModConfig = xoops_getHandler('config'); |
||||
0 ignored issues
–
show
The function
xoops_getHandler was not found. Maybe you did not declare it correctly or list all dependencies?
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
![]() |
|||||
122 | $hModule = xoops_getHandler('module'); |
||||
123 | |||||
124 | if (is_object($xoopsUser) && $xoopsUser->isAdmin()) { |
||||
125 | $modversion['sub'][1]['name'] = _MI_XDONATION_ADMIN; |
||||
126 | $modversion['sub'][1]['url'] = 'admin/index.php'; |
||||
127 | } |
||||
128 | |||||
129 | // Templates |
||||
130 | $modversion['templates'][1]['file'] = 'donations_main.tpl'; |
||||
131 | $modversion['templates'][1]['description'] = 'Donations Main Template'; |
||||
132 |