Differences

This shows you the differences between the selected revision and the current version of the page.

punbb13:constants 2009/07/08 07:17 punbb13:constants 2020/02/06 11:04 current
Line 1: Line 1:
-====== Constants ======+====== PunBB 1.3 constants ======
The forum uses constants to define some values, which are used in the code. The values of the constants can be: The forum uses constants to define some values, which are used in the code. The values of the constants can be:
  * Flag (Is debug mode enabled, etc.)   * Flag (Is debug mode enabled, etc.)
Line 24: Line 24:
==== FORUM_SHOW_QUERIES ==== ==== FORUM_SHOW_QUERIES ====
-  * All executed SQL queries will be shown in the footer if this constant is defined. Use this constant only for development purposes, it should never be used on a production server.+  * All executed SQL queries will be shown in the footer if this constant is defined. Use this constant only for development purposes, it must not be used on a production server.
  * Example:   * Example:
<code php>define('FORUM_SHOW_QUERIES', 1);</code> <code php>define('FORUM_SHOW_QUERIES', 1);</code>
==== FORUM_VERSION ==== ==== FORUM_VERSION ====
-  * The version a code is written for. It is used only during installation and update processes. You can get the version of the forum from $forum_config['o_cur_version']. +  * The version a code is written for. It is used only during installation and update processes. You can get the version of the forum from ''$forum_config['o_cur_version']''
-== FORUM_DB_REVISION == +==== FORUM_DB_REVISION ==== 
-  * The database revision a code is written for. It is used only during installation and update processes. You can get the DB reversion of the forum from $forum_config['o_database_revision'].+  * The database revision a code is written for. It is used only during installation and update processes. You can get the DB reversion of the forum from ''$forum_config['o_database_revision']''.
==== FORUM_NO_SET_NAMES ==== ==== FORUM_NO_SET_NAMES ====
-  * If this constant is defined, the database layer will not to send SET NAMES 'utf8' command to the database. This constant is used only to allow the update script to access non UTF-8 data.+  * If this constant is defined, the database layer will not to send ''SET NAMES 'utf8';'' query to the database. This constant is used only to allow the update script to access non UTF-8 data.
==== FORUM_ROOT ==== ==== FORUM_ROOT ====
Line 42: Line 42:
==== FORUM_IGNORE_REQUEST_URI ==== ==== FORUM_IGNORE_REQUEST_URI ====
-  * When user request some forum page, PunBB try to automatically fix the $_SERVER['REQUEST_URI'], if it doesn't valid. Defining this constant will stop Forum to do this. Use this constant for integreation, if you have some problems with URI.+  * When a user requests a forum page, PunBB try to automatically fix $_SERVER['REQUEST_URI'], if it isn't valid. Defining this constant will prevent the forum from doing this. Use this constant for integration, if you have some problems with URI.
  * Example:   * Example:
<code php>define('FORUM_IGNORE_REQUEST_URI', 1);</code> <code php>define('FORUM_IGNORE_REQUEST_URI', 1);</code>
 +
==== FORUM_DISABLE_HOOKS ==== ==== FORUM_DISABLE_HOOKS ====
-  * If this constant was defining, code of installed extensions will not execute.+  * If this constant is defined, the code of installed extensions will not be executed.
  * Example:   * Example:
<code php>define('FORUM_DISABLE_HOOKS', 1);</code> <code php>define('FORUM_DISABLE_HOOKS', 1);</code>
 +
==== FORUM_DISABLE_CSRF_CONFIRM ==== ==== FORUM_DISABLE_CSRF_CONFIRM ====
-  * Defining this constant stops forum CSRF protection. It is strongly **not recommended** to do this.+  * Defining this constant stops the forum's CSRF protection. It is strongly **not recommended** to do this.
  * Example:   * Example:
<code php>define('FORUM_DISABLE_CSRF_CONFIRM', 1);</code> <code php>define('FORUM_DISABLE_CSRF_CONFIRM', 1);</code>
 +
==== FORUM_TURN_OFF_MAINT ==== ==== FORUM_TURN_OFF_MAINT ====
-  * Define this constant, if all administrators logged out of the forum, to turn off the maintenance mode.+  * Define this constant if all administrators are logged out of the forum, to turn off the maintenance mode.
  * Example:   * Example:
<code php>define('FORUM_TURN_OFF_MAINT', 1);</code> <code php>define('FORUM_TURN_OFF_MAINT', 1);</code>
 +
==== FORUM_CACHE_DIR ==== ==== FORUM_CACHE_DIR ====
-  * Path to the cache directory (by default it is set to FORUM_ROOT.'cache/').+  * The path to the cache directory (by default it is set to ''FORUM_ROOT.'cache/' '').
  * Example:   * Example:
<code php>define('FORUM_CACHE_DIR', '/tmp/punbb_cache');</code> <code php>define('FORUM_CACHE_DIR', '/tmp/punbb_cache');</code>
 +
==== FORUM_PAGE ==== ==== FORUM_PAGE ====
-  * The name of forum page, which run now. This constant defined on every forum page. If you create new forum page, you should define it manually.+  * The name of the forum page which is currently running. This constant is defined on every forum page. If you create a new forum page, you should define it manually.
  * Example:   * Example:
<code php>define('FORUM_PAGE', 'viewtopic');</code> <code php>define('FORUM_PAGE', 'viewtopic');</code>

Personal Tools