|
1
|
|
|
<?php |
|
|
|
|
|
|
2
|
|
|
/* |
|
3
|
|
|
XOOPS - PHP Content Management System |
|
4
|
|
|
Copyright (c) 2000 XOOPS.org |
|
5
|
|
|
<http://www.xoops.org/> |
|
6
|
|
|
This program is free software; you can redistribute it and/or modify |
|
7
|
|
|
it under the terms of the GNU General Public License as published by |
|
8
|
|
|
the Free Software Foundation; either version 2 of the License, or |
|
9
|
|
|
(at your option) any later version. |
|
10
|
|
|
|
|
11
|
|
|
You may not change or alter any portion of this comment or credits |
|
12
|
|
|
of supporting developers from this source code or any supporting |
|
13
|
|
|
source code which is considered copyrighted (c) material of the |
|
14
|
|
|
original comment or credit authors. |
|
15
|
|
|
|
|
16
|
|
|
This program is distributed in the hope that it will be useful, |
|
17
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
18
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
19
|
|
|
GNU General Public License for more details. |
|
20
|
|
|
|
|
21
|
|
|
You should have received a copy of the GNU General Public License |
|
22
|
|
|
along with this program; if not, write to the Free Software |
|
23
|
|
|
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
24
|
|
|
*/ |
|
25
|
|
|
/** |
|
26
|
|
|
* Module: XoopsPartners - a partner affiliation links module |
|
27
|
|
|
* |
|
28
|
|
|
* Class to define XOOPS Partners constant values. These constants are |
|
29
|
|
|
* used to make the code easier to read and to keep values in central |
|
30
|
|
|
* location if they need to be changed. These should not normally need |
|
31
|
|
|
* to be modified. If they are to be modified it is recommended to change |
|
32
|
|
|
* the value(s) before module installation. Additionally the module may not |
|
33
|
|
|
* work correctly if trying to upgrade if these values have been changed. |
|
34
|
|
|
* |
|
35
|
|
|
* @category Module |
|
36
|
|
|
* @package xoopspartners |
|
37
|
|
|
* @subpackage class |
|
38
|
|
|
* @author zyspec <[email protected]> |
|
39
|
|
|
* @author XOOPS Module Development Team |
|
40
|
|
|
* @copyright {@link http://xoops.org 2001-2016 XOOPS Project} |
|
41
|
|
|
* @license {@link http://www.gnu.org/licenses/gpl-2.0.html GNU Public License} |
|
42
|
|
|
* @link http://xoops.org XOOPS |
|
43
|
|
|
* @since 1.12 |
|
44
|
|
|
*/ |
|
45
|
|
|
|
|
46
|
|
|
defined('XOOPS_ROOT_PATH') || exit('Restricted access'); |
|
47
|
|
|
|
|
48
|
|
|
/** |
|
49
|
|
|
* Interface XoopspartnersConstants |
|
50
|
|
|
*/ |
|
51
|
|
|
interface XoopspartnersConstants |
|
|
|
|
|
|
52
|
|
|
{ |
|
53
|
|
|
/**#@+ |
|
54
|
|
|
* Constant definition |
|
55
|
|
|
*/ |
|
56
|
|
|
/** |
|
57
|
|
|
* no delay XOOPS redirect delay (in seconds) |
|
58
|
|
|
*/ |
|
59
|
|
|
const REDIRECT_DELAY_NONE = 0; |
|
60
|
|
|
/** |
|
61
|
|
|
* short XOOPS redirect delay (in seconds) |
|
62
|
|
|
*/ |
|
63
|
|
|
const REDIRECT_DELAY_SHORT = 1; |
|
64
|
|
|
/** |
|
65
|
|
|
* medium XOOPS redirect delay (in seconds) |
|
66
|
|
|
*/ |
|
67
|
|
|
const REDIRECT_DELAY_MEDIUM = 3; |
|
68
|
|
|
/** |
|
69
|
|
|
* long XOOPS redirect delay (in seconds) |
|
70
|
|
|
*/ |
|
71
|
|
|
const REDIRECT_DELAY_LONG = 7; |
|
72
|
|
|
/** |
|
73
|
|
|
* default image width (don't change here, change in Preferences) |
|
74
|
|
|
*/ |
|
75
|
|
|
const DEFAULT_MAX_WIDTH = 150; |
|
76
|
|
|
/** |
|
77
|
|
|
* default image height (don't change here, change in Preferences) |
|
78
|
|
|
*/ |
|
79
|
|
|
const DEFAULT_MAX_HEIGHT = 110; |
|
80
|
|
|
/** |
|
81
|
|
|
* value indicates poll options are shown as list |
|
82
|
|
|
*/ |
|
83
|
|
|
const DEFAULT_UPLOAD_SIZE = 1048576; |
|
84
|
|
|
/** |
|
85
|
|
|
* default partner ID |
|
86
|
|
|
*/ |
|
87
|
|
|
const DEFAULT_PID = 0; |
|
88
|
|
|
/** |
|
89
|
|
|
* default module ID |
|
90
|
|
|
*/ |
|
91
|
|
|
const DEFAULT_MID = 0; |
|
92
|
|
|
/** |
|
93
|
|
|
* indicates a partner listing is inactive |
|
94
|
|
|
*/ |
|
95
|
|
|
const STATUS_INACTIVE = 0; |
|
96
|
|
|
/** |
|
97
|
|
|
* indicates a partner listing is active |
|
98
|
|
|
*/ |
|
99
|
|
|
const STATUS_ACTIVE = 1; |
|
100
|
|
|
/** |
|
101
|
|
|
* default poll weight for display order |
|
102
|
|
|
*/ |
|
103
|
|
|
const DEFAULT_WEIGHT = 0; |
|
104
|
|
|
/** |
|
105
|
|
|
* cannot join |
|
106
|
|
|
*/ |
|
107
|
|
|
const JOIN_NOT_OK = 0; |
|
108
|
|
|
/** |
|
109
|
|
|
* ok to join |
|
110
|
|
|
*/ |
|
111
|
|
|
const JOIN_OK = 1; |
|
112
|
|
|
/** |
|
113
|
|
|
* confirm not ok to take action |
|
114
|
|
|
*/ |
|
115
|
|
|
const CONFIRM_NOT_OK = 0; |
|
116
|
|
|
/** |
|
117
|
|
|
* confirm ok to take action |
|
118
|
|
|
*/ |
|
119
|
|
|
const CONFIRM_OK = 1; |
|
120
|
|
|
/**#@-*/ |
|
121
|
|
|
} |
|
122
|
|
|
|
The PSR-1: Basic Coding Standard recommends that a file should either introduce new symbols, that is classes, functions, constants or similar, or have side effects. Side effects are anything that executes logic, like for example printing output, changing ini settings or writing to a file.
The idea behind this recommendation is that merely auto-loading a class should not change the state of an application. It also promotes a cleaner style of programming and makes your code less prone to errors, because the logic is not spread out all over the place.
To learn more about the PSR-1, please see the PHP-FIG site on the PSR-1.