FluxBB's code makes use of constants in order to define certain set values that are used throughout the code (pre-defined constants) as well as for several configuration settings (user-defined constants).
Pre-defined constants allow FluxBB to associate a value with a descriptive string in order to facilitate the common use of the value / simplify the process of changing that value throughout the code. A reference of such constants is provided below. The constants are grouped by the version of the software they exist in. They are given along with their value and a description of what they are/how to use them.
| Constant name | Value | Description |
|---|---|---|
| FORUM_UNVERIFIED | 0 | The group ID given to users when email verification of registrations is enabled. When the users actually log in for the first time, their group ID is changed to that of the default group for new users. |
| FORUM_ADMIN | 1 | The group ID given to administrators. |
| FORUM_GUEST | 2 | The group ID given to the Guest user. |
| Constant name | Value | Description |
|---|---|---|
| PUN_UNVERIFIED | 32000 | See FORUM_UNVERIFIED |
| PUN_ADMIN | 1 | See FORUM_ADMIN |
| PUN_MOD | 2 | The group ID given to moderators. Does not exist in 1.3 because of the ability to have multiple moderator groups. |
| PUN_GUEST | 3 | See FORUM_GUEST |
| PUN_MEMBER | 4 | The group ID given to users in the member group created by install.php. Does not exist in 1.3 because it was found to be unnecessary. |
FluxBB's code uses several constants that, when defined, modify its behavior. Most of these constants do not ever need to be used by the average user. However, some are useful for debugging and others are important for advanced users. A reference is provided below for those users who may want/need to use these constants. The constants are given along a description of what they do/how to use them.
All constants (with the exception of certain per-page constants such as FORUM_ROOT) in 1.3 should be defined in config.php. Administrators should not edit the core to add these constants in.
if (!defined('FORUM_ROOT')) define('FORUM_ROOT', './'); require FORUM_ROOT.'include/common.php';
define('FORUM_DEBUG', 1);
define('FORUM_SHOW_QUERIES', 1);
define('FORUM_DISABLE_HOOKS', 1);
define('FORUM_TURN_OFF_MAINT', 1);
define('FORUM_DISABLE_BUFFERING', 1);
// This should make FluxBB's cache system work with Sourceforge define('FORUM_CACHE_DIR', '/tmp/persistent/');
define('FORUM_NO_SET_NAMES', 1);
define('FORUM_DISABLE_CSRF_CONFIRM', 1);
define('FORUM_IGNORE_REQUEST_URI', 1);
define('FORUM_DISABLE_URL_CONFIRM', 1);
All constants (with the exception of certain per-page constants such as PUN_ROOT) in 1.2 should be defined at the top of include/common.php. Some are already defined but commented out. In that case, simply uncommenting them will work.
define('PUN_ROOT', './'); require PUN_ROOT.'include/common.php';
define('PUN_DEBUG', 1);
define('PUN_SHOW_QUERIES', 1);
define('PUN_TURN_OFF_MAINT', 1);
define('PUN_DISABLE_BUFFERING', 1);