Instead of
if ($forum_user['id'] == '1')
Try using this instead:
if ($forum_user['is_guest'])
You are not logged in. Please login or register.
PunBB Forums → Posts by the-golem
Pages 1
Instead of
if ($forum_user['id'] == '1')
Try using this instead:
if ($forum_user['is_guest'])
So I'm trying to simply maintain user information across the site (see if the user is logged in, get the username, user id, etc) to unlock a few extra functions without having two registration/login forms. I found the code that says at the beginning of the page I add:
define('FORUM_ROOT', './forum/'); require FORUM_ROOT.'include/common.php';
Basically, it's including the common.php page just fine, but no matter what I do I keep getting the same message of:
The constant FORUM_ROOT must be defined and point to a valid PunBB installation root directory.
Despite the fact that FORUM_ROOT _IS_ defined. I'm lost, and I've tinkered with this as much as I understand...
It depends on where your forum is installed, and you need to use the right relative path.
For example, this line: tells to look in the current directory/folder for a folder called "forum"
define('FORUM_ROOT', './forum/');
example folder structure:
www
current-folder
forum
Typing in "../forum/" tells the system go up the directory tree one step, then look for a folder called forum"
Typing in "/forum/" tells the system go all the way up to the root of the tree, then look for a folder called "forum"
If your forum isn't in a sub-directory of your current folder, it won't find it.
Pages 1
PunBB Forums → Posts by the-golem
Powered by PunBB, supported by Informer Technologies, Inc.