PageRenderTime 235ms CodeModel.GetById 22ms RepoModel.GetById 1ms app.codeStats 0ms

/phpBB/includes/constants.php

https://github.com/naderman/phpbb-orchestra
PHP | 282 lines | 185 code | 42 blank | 55 comment | 1 complexity | 47d2a7c83833a60402ca3f039dc5f381 MD5 | raw file
  1. <?php
  2. /**
  3. *
  4. * @package phpBB3
  5. * @version $Id$
  6. * @copyright (c) 2005 phpBB Group
  7. * @license http://opensource.org/licenses/gpl-license.php GNU Public License
  8. *
  9. */
  10. /**
  11. * @ignore
  12. */
  13. if (!defined('IN_PHPBB'))
  14. {
  15. exit;
  16. }
  17. /**
  18. * valid external constants:
  19. * PHPBB_MSG_HANDLER
  20. * PHPBB_DB_NEW_LINK
  21. * PHPBB_ROOT_PATH
  22. * PHPBB_ADMIN_PATH
  23. */
  24. // phpBB Version
  25. define('PHPBB_VERSION', '3.0.9');
  26. // QA-related
  27. // define('PHPBB_QA', 1);
  28. // User related
  29. define('ANONYMOUS', 1);
  30. define('USER_ACTIVATION_NONE', 0);
  31. define('USER_ACTIVATION_SELF', 1);
  32. define('USER_ACTIVATION_ADMIN', 2);
  33. define('USER_ACTIVATION_DISABLE', 3);
  34. define('AVATAR_UPLOAD', 1);
  35. define('AVATAR_REMOTE', 2);
  36. define('AVATAR_GALLERY', 3);
  37. define('USER_NORMAL', 0);
  38. define('USER_INACTIVE', 1);
  39. define('USER_IGNORE', 2);
  40. define('USER_FOUNDER', 3);
  41. define('INACTIVE_REGISTER', 1);
  42. define('INACTIVE_PROFILE', 2);
  43. define('INACTIVE_MANUAL', 3);
  44. define('INACTIVE_REMIND', 4);
  45. // ACL
  46. define('ACL_NEVER', 0);
  47. define('ACL_YES', 1);
  48. define('ACL_NO', -1);
  49. // Login error codes
  50. define('LOGIN_CONTINUE', 1);
  51. define('LOGIN_BREAK', 2);
  52. define('LOGIN_SUCCESS', 3);
  53. define('LOGIN_SUCCESS_CREATE_PROFILE', 20);
  54. define('LOGIN_ERROR_USERNAME', 10);
  55. define('LOGIN_ERROR_PASSWORD', 11);
  56. define('LOGIN_ERROR_ACTIVE', 12);
  57. define('LOGIN_ERROR_ATTEMPTS', 13);
  58. define('LOGIN_ERROR_EXTERNAL_AUTH', 14);
  59. define('LOGIN_ERROR_PASSWORD_CONVERT', 15);
  60. // Maximum login attempts
  61. // The value is arbitrary, but it has to fit into the user_login_attempts field.
  62. define('LOGIN_ATTEMPTS_MAX', 100);
  63. // Group settings
  64. define('GROUP_OPEN', 0);
  65. define('GROUP_CLOSED', 1);
  66. define('GROUP_HIDDEN', 2);
  67. define('GROUP_SPECIAL', 3);
  68. define('GROUP_FREE', 4);
  69. // Forum/Topic states
  70. define('FORUM_CAT', 0);
  71. define('FORUM_POST', 1);
  72. define('FORUM_LINK', 2);
  73. define('ITEM_UNLOCKED', 0);
  74. define('ITEM_LOCKED', 1);
  75. define('ITEM_MOVED', 2);
  76. // Forum Flags
  77. define('FORUM_FLAG_LINK_TRACK', 1);
  78. define('FORUM_FLAG_PRUNE_POLL', 2);
  79. define('FORUM_FLAG_PRUNE_ANNOUNCE', 4);
  80. define('FORUM_FLAG_PRUNE_STICKY', 8);
  81. define('FORUM_FLAG_ACTIVE_TOPICS', 16);
  82. define('FORUM_FLAG_POST_REVIEW', 32);
  83. define('FORUM_FLAG_QUICK_REPLY', 64);
  84. // Forum Options... sequential order. Modifications should begin at number 10 (number 29 is maximum)
  85. define('FORUM_OPTION_FEED_NEWS', 1);
  86. define('FORUM_OPTION_FEED_EXCLUDE', 2);
  87. // Optional text flags
  88. define('OPTION_FLAG_BBCODE', 1);
  89. define('OPTION_FLAG_SMILIES', 2);
  90. define('OPTION_FLAG_LINKS', 4);
  91. // Topic types
  92. define('POST_NORMAL', 0);
  93. define('POST_STICKY', 1);
  94. define('POST_ANNOUNCE', 2);
  95. define('POST_GLOBAL', 3);
  96. // Lastread types
  97. define('TRACK_NORMAL', 0);
  98. define('TRACK_POSTED', 1);
  99. // Notify methods
  100. define('NOTIFY_EMAIL', 0);
  101. define('NOTIFY_IM', 1);
  102. define('NOTIFY_BOTH', 2);
  103. // Notify status
  104. define('NOTIFY_YES', 0);
  105. define('NOTIFY_NO', 1);
  106. // Email Priority Settings
  107. define('MAIL_LOW_PRIORITY', 4);
  108. define('MAIL_NORMAL_PRIORITY', 3);
  109. define('MAIL_HIGH_PRIORITY', 2);
  110. // Log types
  111. define('LOG_ADMIN', 0);
  112. define('LOG_MOD', 1);
  113. define('LOG_CRITICAL', 2);
  114. define('LOG_USERS', 3);
  115. // Private messaging - Do NOT change these values
  116. define('PRIVMSGS_HOLD_BOX', -4);
  117. define('PRIVMSGS_NO_BOX', -3);
  118. define('PRIVMSGS_OUTBOX', -2);
  119. define('PRIVMSGS_SENTBOX', -1);
  120. define('PRIVMSGS_INBOX', 0);
  121. // Full Folder Actions
  122. define('FULL_FOLDER_NONE', -3);
  123. define('FULL_FOLDER_DELETE', -2);
  124. define('FULL_FOLDER_HOLD', -1);
  125. // Download Modes - Attachments
  126. define('INLINE_LINK', 1);
  127. // This mode is only used internally to allow modders extending the attachment functionality
  128. define('PHYSICAL_LINK', 2);
  129. // Confirm types
  130. define('CONFIRM_REG', 1);
  131. define('CONFIRM_LOGIN', 2);
  132. define('CONFIRM_POST', 3);
  133. // Categories - Attachments
  134. define('ATTACHMENT_CATEGORY_NONE', 0);
  135. define('ATTACHMENT_CATEGORY_IMAGE', 1); // Inline Images
  136. define('ATTACHMENT_CATEGORY_WM', 2); // Windows Media Files - Streaming
  137. define('ATTACHMENT_CATEGORY_RM', 3); // Real Media Files - Streaming
  138. define('ATTACHMENT_CATEGORY_THUMB', 4); // Not used within the database, only while displaying posts
  139. define('ATTACHMENT_CATEGORY_FLASH', 5); // Flash/SWF files
  140. define('ATTACHMENT_CATEGORY_QUICKTIME', 6); // Quicktime/Mov files
  141. // BBCode UID length
  142. define('BBCODE_UID_LEN', 8);
  143. // Number of core BBCodes
  144. define('NUM_CORE_BBCODES', 12);
  145. // BBCode hard limit
  146. define('BBCODE_LIMIT', 1511);
  147. // Smiley hard limit
  148. define('SMILEY_LIMIT', 1000);
  149. // Magic url types
  150. define('MAGIC_URL_EMAIL', 1);
  151. define('MAGIC_URL_FULL', 2);
  152. define('MAGIC_URL_LOCAL', 3);
  153. define('MAGIC_URL_WWW', 4);
  154. // Profile Field Types
  155. define('FIELD_INT', 1);
  156. define('FIELD_STRING', 2);
  157. define('FIELD_TEXT', 3);
  158. define('FIELD_BOOL', 4);
  159. define('FIELD_DROPDOWN', 5);
  160. define('FIELD_DATE', 6);
  161. // referer validation
  162. define('REFERER_VALIDATE_NONE', 0);
  163. define('REFERER_VALIDATE_HOST', 1);
  164. define('REFERER_VALIDATE_PATH', 2);
  165. // phpbb_chmod() permissions
  166. @define('CHMOD_ALL', 7);
  167. @define('CHMOD_READ', 4);
  168. @define('CHMOD_WRITE', 2);
  169. @define('CHMOD_EXECUTE', 1);
  170. // Captcha code length
  171. define('CAPTCHA_MIN_CHARS', 4);
  172. define('CAPTCHA_MAX_CHARS', 7);
  173. // Additional constants
  174. define('VOTE_CONVERTED', 127);
  175. // Table names
  176. define('ACL_GROUPS_TABLE', $table_prefix . 'acl_groups');
  177. define('ACL_OPTIONS_TABLE', $table_prefix . 'acl_options');
  178. define('ACL_ROLES_DATA_TABLE', $table_prefix . 'acl_roles_data');
  179. define('ACL_ROLES_TABLE', $table_prefix . 'acl_roles');
  180. define('ACL_USERS_TABLE', $table_prefix . 'acl_users');
  181. define('ATTACHMENTS_TABLE', $table_prefix . 'attachments');
  182. define('BANLIST_TABLE', $table_prefix . 'banlist');
  183. define('BBCODES_TABLE', $table_prefix . 'bbcodes');
  184. define('BOOKMARKS_TABLE', $table_prefix . 'bookmarks');
  185. define('BOTS_TABLE', $table_prefix . 'bots');
  186. define('CONFIG_TABLE', $table_prefix . 'config');
  187. define('CONFIRM_TABLE', $table_prefix . 'confirm');
  188. define('DISALLOW_TABLE', $table_prefix . 'disallow');
  189. define('DRAFTS_TABLE', $table_prefix . 'drafts');
  190. define('EXTENSIONS_TABLE', $table_prefix . 'extensions');
  191. define('EXTENSION_GROUPS_TABLE', $table_prefix . 'extension_groups');
  192. define('FORUMS_TABLE', $table_prefix . 'forums');
  193. define('FORUMS_ACCESS_TABLE', $table_prefix . 'forums_access');
  194. define('FORUMS_TRACK_TABLE', $table_prefix . 'forums_track');
  195. define('FORUMS_WATCH_TABLE', $table_prefix . 'forums_watch');
  196. define('GROUPS_TABLE', $table_prefix . 'groups');
  197. define('ICONS_TABLE', $table_prefix . 'icons');
  198. define('LANG_TABLE', $table_prefix . 'lang');
  199. define('LOG_TABLE', $table_prefix . 'log');
  200. define('LOGIN_ATTEMPT_TABLE', $table_prefix . 'login_attempts');
  201. define('MODERATOR_CACHE_TABLE', $table_prefix . 'moderator_cache');
  202. define('MODULES_TABLE', $table_prefix . 'modules');
  203. define('POLL_OPTIONS_TABLE', $table_prefix . 'poll_options');
  204. define('POLL_VOTES_TABLE', $table_prefix . 'poll_votes');
  205. define('POSTS_TABLE', $table_prefix . 'posts');
  206. define('PRIVMSGS_TABLE', $table_prefix . 'privmsgs');
  207. define('PRIVMSGS_FOLDER_TABLE', $table_prefix . 'privmsgs_folder');
  208. define('PRIVMSGS_RULES_TABLE', $table_prefix . 'privmsgs_rules');
  209. define('PRIVMSGS_TO_TABLE', $table_prefix . 'privmsgs_to');
  210. define('PROFILE_FIELDS_TABLE', $table_prefix . 'profile_fields');
  211. define('PROFILE_FIELDS_DATA_TABLE', $table_prefix . 'profile_fields_data');
  212. define('PROFILE_FIELDS_LANG_TABLE', $table_prefix . 'profile_fields_lang');
  213. define('PROFILE_LANG_TABLE', $table_prefix . 'profile_lang');
  214. define('RANKS_TABLE', $table_prefix . 'ranks');
  215. define('REPORTS_TABLE', $table_prefix . 'reports');
  216. define('REPORTS_REASONS_TABLE', $table_prefix . 'reports_reasons');
  217. define('SEARCH_RESULTS_TABLE', $table_prefix . 'search_results');
  218. define('SEARCH_WORDLIST_TABLE', $table_prefix . 'search_wordlist');
  219. define('SEARCH_WORDMATCH_TABLE', $table_prefix . 'search_wordmatch');
  220. define('SESSIONS_TABLE', $table_prefix . 'sessions');
  221. define('SESSIONS_KEYS_TABLE', $table_prefix . 'sessions_keys');
  222. define('SITELIST_TABLE', $table_prefix . 'sitelist');
  223. define('SMILIES_TABLE', $table_prefix . 'smilies');
  224. define('STYLES_TABLE', $table_prefix . 'styles');
  225. define('STYLES_TEMPLATE_TABLE', $table_prefix . 'styles_template');
  226. define('STYLES_TEMPLATE_DATA_TABLE',$table_prefix . 'styles_template_data');
  227. define('STYLES_THEME_TABLE', $table_prefix . 'styles_theme');
  228. define('STYLES_IMAGESET_TABLE', $table_prefix . 'styles_imageset');
  229. define('STYLES_IMAGESET_DATA_TABLE',$table_prefix . 'styles_imageset_data');
  230. define('TOPICS_TABLE', $table_prefix . 'topics');
  231. define('TOPICS_POSTED_TABLE', $table_prefix . 'topics_posted');
  232. define('TOPICS_TRACK_TABLE', $table_prefix . 'topics_track');
  233. define('TOPICS_WATCH_TABLE', $table_prefix . 'topics_watch');
  234. define('USER_GROUP_TABLE', $table_prefix . 'user_group');
  235. define('USERS_TABLE', $table_prefix . 'users');
  236. define('WARNINGS_TABLE', $table_prefix . 'warnings');
  237. define('WORDS_TABLE', $table_prefix . 'words');
  238. define('ZEBRA_TABLE', $table_prefix . 'zebra');
  239. // Additional tables
  240. ?>