Topic: Showing user information on pages outside of forums.
I've recently added a some code to the top of the pages on my site to show if the user is logged in our not (outside of the forums).
<?
define('PUN_ROOT', './forums/');
require_once PUN_ROOT.'include/common.php';
if ($pun_user['is_guest'])
echo "Guest";
else
{
echo $pun_user['username'];
}
?>
This works great outside of the forums, but when I placed the same thing in the layout header of my forums it didn't work at all. It just shows you always as "Guest", even if you're logged in.
When I say the layout header of my forums I mean that I've created a seperate file for my layout and just included it in the punbb header (header.php). It works fine doing it this way and I haven't had trouble with that at all.
I've left it in my site to show as an example of what's going wrong, so if you'd like to check it out go to:
http://eksource.com/forums
You can clearly see it's working fine on all the pages outside of the forums at:
http://eksource.com/articles
I'd appreciate your help.
Thanks,
stickycarrots
p.s.: You may note I completely removed the <status> off my forums. It wasn't working before this either.