Differences

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

punbb13:global_variables 2009/07/08 08:03 punbb13:global_variables 2020/02/06 11:04 current
Line 1: Line 1:
-====== Global variables ====== +====== PunBB 1.3 Global Variables ====== 
-At every forum page there is a list of forum variables, which uses for page generation. This variables will be available after including  file FORUM_ROOT.'include/common.php' to the code. Here the list of variables:+There is a number of forum variables available on every forum page. These variables are used for the page generation. To use them one has to include the FORUM_ROOT.'include/common.php' file first. 
===== $forum_user ===== ===== $forum_user =====
-This variable correspond an associative array with some information about user (user id, group id, username, profile options, user permissions, etc.) For example: +This variable correlates an associative array with some information about a user (user id, group id, username, profile options, user permissions, etc.) For example: 
-  * $forum_user['id'] contain id of user; +  * ''$forum_user['id']'' contains user's id
-  * $forum_user['language'] contain language, which was selected in profile; +  * ''$forum_user['language']'' contains the language selected in user's profile; 
-  * $forum_user['g_post_topics'] shows can user post topics or not.+  * ''$forum_user['g_post_topics']'' shows whether the user can post topics or not.
===== $forum_config ===== ===== $forum_config =====
-The variable correspond an associative array all configuration options (board title, sef scheme, etc.) For example: +This variable correlates an associative array with all configuration options (board title, sef scheme, etc.) For example: 
-  * $forum_config['o_default_lang'] contain default language of forum; +  * ''$forum_config['o_default_lang']'' contains the default language of the forum; 
-  * $forum_config['o_avatars_dir'] is a path to directory, where avatars will be saved.+  * ''$forum_config['o_avatars_dir']'' is the path to the directory, where avatars are saved.
===== $forum_db ===== ===== $forum_db =====
-This variable is an instance of database layer. It is used to perform an SQL-queries. How to use it read this [[punbb13/integration#database_helpers|article]].+This variable is an instance of the database layer. It is used to perform SQL queries. See the [[punbb13:database helpers|database helper description]] for details.

Personal Tools