1<?php 2/** 3* 4* This file is part of the phpBB Forum Software package. 5* 6* @copyright (c) phpBB Limited <https://www.phpbb.com> 7* @license GNU General Public License, version 2 (GPL-2.0) 8* 9* For full copyright and license information, please see 10* the docs/CREDITS.txt file. 11* 12*/ 13 14/** 15* @ignore 16*/ 17if (!defined('IN_PHPBB')) 18{ 19 exit; 20} 21 22/** 23* valid external constants: 24* PHPBB_MSG_HANDLER 25* PHPBB_DB_NEW_LINK 26* PHPBB_ROOT_PATH 27* PHPBB_ADMIN_PATH 28*/ 29 30// phpBB Version 31@define('PHPBB_VERSION', '3.3.4'); 32 33// QA-related 34// define('PHPBB_QA', 1); 35 36// User related 37define('ANONYMOUS', 1); 38 39define('USER_ACTIVATION_NONE', 0); 40define('USER_ACTIVATION_SELF', 1); 41define('USER_ACTIVATION_ADMIN', 2); 42define('USER_ACTIVATION_DISABLE', 3); 43 44define('AVATAR_UPLOAD', 1); 45define('AVATAR_REMOTE', 2); 46define('AVATAR_GALLERY', 3); 47 48define('USER_NORMAL', 0); 49define('USER_INACTIVE', 1); 50define('USER_IGNORE', 2); 51define('USER_FOUNDER', 3); 52 53define('INACTIVE_REGISTER', 1); // Newly registered account 54define('INACTIVE_PROFILE', 2); // Profile details changed 55define('INACTIVE_MANUAL', 3); // Account deactivated by administrator 56define('INACTIVE_REMIND', 4); // Forced user account reactivation 57 58// ACL 59define('ACL_NEVER', 0); 60define('ACL_YES', 1); 61define('ACL_NO', -1); 62 63// Login error codes 64define('LOGIN_CONTINUE', 1); 65define('LOGIN_BREAK', 2); 66define('LOGIN_SUCCESS', 3); 67define('LOGIN_SUCCESS_CREATE_PROFILE', 20); 68define('LOGIN_SUCCESS_LINK_PROFILE', 21); 69define('LOGIN_ERROR_USERNAME', 10); 70define('LOGIN_ERROR_PASSWORD', 11); 71define('LOGIN_ERROR_ACTIVE', 12); 72define('LOGIN_ERROR_ATTEMPTS', 13); 73define('LOGIN_ERROR_EXTERNAL_AUTH', 14); 74define('LOGIN_ERROR_PASSWORD_CONVERT', 15); 75 76// Maximum login attempts 77// The value is arbitrary, but it has to fit into the user_login_attempts field. 78define('LOGIN_ATTEMPTS_MAX', 100); 79 80// Group settings 81define('GROUP_OPEN', 0); 82define('GROUP_CLOSED', 1); 83define('GROUP_HIDDEN', 2); 84define('GROUP_SPECIAL', 3); 85define('GROUP_FREE', 4); 86 87// Forum/Topic states 88define('FORUM_CAT', 0); 89define('FORUM_POST', 1); 90define('FORUM_LINK', 2); 91define('ITEM_UNLOCKED', 0); 92define('ITEM_LOCKED', 1); 93define('ITEM_MOVED', 2); 94 95define('ITEM_UNAPPROVED', 0); // => has not yet been approved 96define('ITEM_APPROVED', 1); // => has been approved, and has not been soft deleted 97define('ITEM_DELETED', 2); // => has been soft deleted 98define('ITEM_REAPPROVE', 3); // => has been edited and needs to be re-approved 99 100// Forum Flags 101define('FORUM_FLAG_LINK_TRACK', 1); 102define('FORUM_FLAG_PRUNE_POLL', 2); 103define('FORUM_FLAG_PRUNE_ANNOUNCE', 4); 104define('FORUM_FLAG_PRUNE_STICKY', 8); 105define('FORUM_FLAG_ACTIVE_TOPICS', 16); 106define('FORUM_FLAG_POST_REVIEW', 32); 107define('FORUM_FLAG_QUICK_REPLY', 64); 108 109// Forum Options... sequential order. Modifications should begin at number 10 (number 29 is maximum) 110define('FORUM_OPTION_FEED_NEWS', 1); 111define('FORUM_OPTION_FEED_EXCLUDE', 2); 112 113// Optional text flags 114define('OPTION_FLAG_BBCODE', 1); 115define('OPTION_FLAG_SMILIES', 2); 116define('OPTION_FLAG_LINKS', 4); 117 118// Topic types 119define('POST_NORMAL', 0); 120define('POST_STICKY', 1); 121define('POST_ANNOUNCE', 2); 122define('POST_GLOBAL', 3); 123 124// Lastread types 125define('TRACK_NORMAL', 0); 126define('TRACK_POSTED', 1); 127 128// Notify methods 129define('NOTIFY_EMAIL', 0); 130define('NOTIFY_IM', 1); 131define('NOTIFY_BOTH', 2); 132 133// Notify status 134define('NOTIFY_YES', 0); 135define('NOTIFY_NO', 1); 136 137// Email Priority Settings 138define('MAIL_LOW_PRIORITY', 4); 139define('MAIL_NORMAL_PRIORITY', 3); 140define('MAIL_HIGH_PRIORITY', 2); 141 142// Log types 143define('LOG_ADMIN', 0); 144define('LOG_MOD', 1); 145define('LOG_CRITICAL', 2); 146define('LOG_USERS', 3); 147 148// Private messaging - Do NOT change these values 149define('PRIVMSGS_HOLD_BOX', -4); 150define('PRIVMSGS_NO_BOX', -3); 151define('PRIVMSGS_OUTBOX', -2); 152define('PRIVMSGS_SENTBOX', -1); 153define('PRIVMSGS_INBOX', 0); 154 155// Full Folder Actions 156define('FULL_FOLDER_NONE', -3); 157define('FULL_FOLDER_DELETE', -2); 158define('FULL_FOLDER_HOLD', -1); 159 160// Download Modes - Attachments 161define('INLINE_LINK', 1); 162// This mode is only used internally to allow modders extending the attachment functionality 163define('PHYSICAL_LINK', 2); 164 165// Confirm types 166define('CONFIRM_REG', 1); 167define('CONFIRM_LOGIN', 2); 168define('CONFIRM_POST', 3); 169define('CONFIRM_REPORT', 4); 170 171// Categories - Attachments 172define('ATTACHMENT_CATEGORY_NONE', 0); 173define('ATTACHMENT_CATEGORY_IMAGE', 1); // Inline Images 174define('ATTACHMENT_CATEGORY_THUMB', 4); // Not used within the database, only while displaying posts 175 176// BBCode UID length 177define('BBCODE_UID_LEN', 8); 178 179// Number of core BBCodes 180define('NUM_CORE_BBCODES', 12); 181define('NUM_PREDEFINED_BBCODES', 22); 182 183// BBCode IDs 184define('BBCODE_ID_QUOTE', 0); 185define('BBCODE_ID_B', 1); 186define('BBCODE_ID_I', 2); 187define('BBCODE_ID_URL', 3); 188define('BBCODE_ID_IMG', 4); 189define('BBCODE_ID_SIZE', 5); 190define('BBCODE_ID_COLOR', 6); 191define('BBCODE_ID_U', 7); 192define('BBCODE_ID_CODE', 8); 193define('BBCODE_ID_LIST', 9); 194define('BBCODE_ID_EMAIL', 10); 195define('BBCODE_ID_FLASH', 11); 196define('BBCODE_ID_ATTACH', 12); 197 198// BBCode hard limit 199define('BBCODE_LIMIT', 1511); 200 201// Smiley hard limit 202define('SMILEY_LIMIT', 1000); 203 204// Magic url types 205define('MAGIC_URL_EMAIL', 1); 206define('MAGIC_URL_FULL', 2); 207define('MAGIC_URL_LOCAL', 3); 208define('MAGIC_URL_WWW', 4); 209 210// Profile Field Types 211define('FIELD_INT', 1); 212define('FIELD_STRING', 2); 213define('FIELD_TEXT', 3); 214define('FIELD_BOOL', 4); 215define('FIELD_DROPDOWN', 5); 216define('FIELD_DATE', 6); 217 218// referer validation 219define('REFERER_VALIDATE_NONE', 0); 220define('REFERER_VALIDATE_HOST', 1); 221define('REFERER_VALIDATE_PATH', 2); 222 223// phpbb_chmod() permissions 224@define('CHMOD_ALL', 7); // @deprecated 3.2.10 225@define('CHMOD_READ', 4); // @deprecated 3.2.10 226@define('CHMOD_WRITE', 2); // @deprecated 3.2.10 227@define('CHMOD_EXECUTE', 1); // @deprecated 3.2.10 228 229// Captcha code length 230define('CAPTCHA_MIN_CHARS', 4); 231define('CAPTCHA_MAX_CHARS', 7); 232 233// Additional constants 234define('VOTE_CONVERTED', 127); 235 236// BC global FTW 237global $table_prefix; 238 239// Table names 240define('ACL_GROUPS_TABLE', $table_prefix . 'acl_groups'); 241define('ACL_OPTIONS_TABLE', $table_prefix . 'acl_options'); 242define('ACL_ROLES_DATA_TABLE', $table_prefix . 'acl_roles_data'); 243define('ACL_ROLES_TABLE', $table_prefix . 'acl_roles'); 244define('ACL_USERS_TABLE', $table_prefix . 'acl_users'); 245define('ATTACHMENTS_TABLE', $table_prefix . 'attachments'); 246define('BANLIST_TABLE', $table_prefix . 'banlist'); 247define('BBCODES_TABLE', $table_prefix . 'bbcodes'); 248define('BOOKMARKS_TABLE', $table_prefix . 'bookmarks'); 249define('BOTS_TABLE', $table_prefix . 'bots'); 250if (!defined('CONFIG_TABLE')) 251{ 252 define('CONFIG_TABLE', $table_prefix . 'config'); 253} 254define('CONFIG_TEXT_TABLE', $table_prefix . 'config_text'); 255define('CONFIRM_TABLE', $table_prefix . 'confirm'); 256define('DISALLOW_TABLE', $table_prefix . 'disallow'); 257define('DRAFTS_TABLE', $table_prefix . 'drafts'); 258define('EXT_TABLE', $table_prefix . 'ext'); 259define('EXTENSIONS_TABLE', $table_prefix . 'extensions'); 260define('EXTENSION_GROUPS_TABLE', $table_prefix . 'extension_groups'); 261define('FORUMS_TABLE', $table_prefix . 'forums'); 262define('FORUMS_ACCESS_TABLE', $table_prefix . 'forums_access'); 263define('FORUMS_TRACK_TABLE', $table_prefix . 'forums_track'); 264define('FORUMS_WATCH_TABLE', $table_prefix . 'forums_watch'); 265define('GROUPS_TABLE', $table_prefix . 'groups'); 266define('ICONS_TABLE', $table_prefix . 'icons'); 267define('LANG_TABLE', $table_prefix . 'lang'); 268define('LOG_TABLE', $table_prefix . 'log'); 269define('LOGIN_ATTEMPT_TABLE', $table_prefix . 'login_attempts'); 270define('MIGRATIONS_TABLE', $table_prefix . 'migrations'); 271define('MODERATOR_CACHE_TABLE', $table_prefix . 'moderator_cache'); 272define('MODULES_TABLE', $table_prefix . 'modules'); 273define('NOTIFICATION_TYPES_TABLE', $table_prefix . 'notification_types'); 274define('NOTIFICATIONS_TABLE', $table_prefix . 'notifications'); 275define('POLL_OPTIONS_TABLE', $table_prefix . 'poll_options'); 276define('POLL_VOTES_TABLE', $table_prefix . 'poll_votes'); 277define('POSTS_TABLE', $table_prefix . 'posts'); 278define('PRIVMSGS_TABLE', $table_prefix . 'privmsgs'); 279define('PRIVMSGS_FOLDER_TABLE', $table_prefix . 'privmsgs_folder'); 280define('PRIVMSGS_RULES_TABLE', $table_prefix . 'privmsgs_rules'); 281define('PRIVMSGS_TO_TABLE', $table_prefix . 'privmsgs_to'); 282define('PROFILE_FIELDS_TABLE', $table_prefix . 'profile_fields'); 283define('PROFILE_FIELDS_DATA_TABLE', $table_prefix . 'profile_fields_data'); 284define('PROFILE_FIELDS_LANG_TABLE', $table_prefix . 'profile_fields_lang'); 285define('PROFILE_LANG_TABLE', $table_prefix . 'profile_lang'); 286define('RANKS_TABLE', $table_prefix . 'ranks'); 287define('REPORTS_TABLE', $table_prefix . 'reports'); 288define('REPORTS_REASONS_TABLE', $table_prefix . 'reports_reasons'); 289define('SEARCH_RESULTS_TABLE', $table_prefix . 'search_results'); 290define('SEARCH_WORDLIST_TABLE', $table_prefix . 'search_wordlist'); 291define('SEARCH_WORDMATCH_TABLE', $table_prefix . 'search_wordmatch'); 292define('SESSIONS_TABLE', $table_prefix . 'sessions'); 293define('SESSIONS_KEYS_TABLE', $table_prefix . 'sessions_keys'); 294define('SITELIST_TABLE', $table_prefix . 'sitelist'); 295define('SMILIES_TABLE', $table_prefix . 'smilies'); 296define('SPHINX_TABLE', $table_prefix . 'sphinx'); 297define('STYLES_TABLE', $table_prefix . 'styles'); 298define('STYLES_TEMPLATE_TABLE', $table_prefix . 'styles_template'); 299define('STYLES_TEMPLATE_DATA_TABLE',$table_prefix . 'styles_template_data'); 300define('STYLES_THEME_TABLE', $table_prefix . 'styles_theme'); 301define('STYLES_IMAGESET_TABLE', $table_prefix . 'styles_imageset'); 302define('STYLES_IMAGESET_DATA_TABLE',$table_prefix . 'styles_imageset_data'); 303define('TEAMPAGE_TABLE', $table_prefix . 'teampage'); 304define('TOPICS_TABLE', $table_prefix . 'topics'); 305define('TOPICS_POSTED_TABLE', $table_prefix . 'topics_posted'); 306define('TOPICS_TRACK_TABLE', $table_prefix . 'topics_track'); 307define('TOPICS_WATCH_TABLE', $table_prefix . 'topics_watch'); 308define('USER_GROUP_TABLE', $table_prefix . 'user_group'); 309define('USER_NOTIFICATIONS_TABLE', $table_prefix . 'user_notifications'); 310define('USERS_TABLE', $table_prefix . 'users'); 311define('WARNINGS_TABLE', $table_prefix . 'warnings'); 312define('WORDS_TABLE', $table_prefix . 'words'); 313define('ZEBRA_TABLE', $table_prefix . 'zebra'); 314 315// Additional tables 316