Differences

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

punbb13:constants 2009/07/08 07:20 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 62: Line 62:
==== 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