This is an old revision of the document!
Table of Contents
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:
$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:
- $forum_user['id'] contain id of user;
- $forum_user['language'] contain language, which was selected in profile;
- $forum_user['g_post_topics'] shows can user post topics or not.
$forum_config
The variable correspond an associative array all configuration options (board title, sef scheme, etc.) For example:
- $forum_config['o_default_lang'] contain default language of forum;
- $forum_config['o_avatars_dir'] is a path to directory, where avatars will be saved.
$forum_db
This variable is an instance of database layer. It is used to perform an SQL-queries. How to use it read this article.