It displays:
Hello Guest, Login/Register/Lost Password
and if you are logged in
Welcome back (username), Inbox (Number of unread messages), User CP, View New Posts, Logout.
But, when I log in, the text doesn't change, it still says Hello Guest.
I have included this at the top of my index.php
<?php
$rel = "./forums/"; // The directory to your forum--relative to this file's location; include ending slash
define("IN_MYBB", 1);
chdir($rel);
include "global.php";
?>
and this is the code I use to display those links:
<?php
if($mybb->user['uid'])
{
?>
Welcome, <a href="<?php echo $rel; ?>member.php?action=profile&uid=<?php echo $mybb->user["uid"]; ?>"><? echo"<strong>".$mybb->user['username']."</strong>"?></a> | <? if($mybb->user['usergroup'] == 4)
{
$alink = "<a href='/forums/admin/index.php'>Forum CP</a> |";
}
echo $alink;?><? if($mybb->user['usergroup'] == 4)
{
$alink = "<a href='sitecp.php'>Site CP</a> |";
}
echo $alink;?> <a href="<?php echo $rel; ?>private.php">Inbox (<? echo"<strong>".$mybb->user['newpms']."</strong>"?>)</a> | <a href="<?php echo $rel; ?>search.php?action=getnew">View new posts</a> | <a href="<?php echo $rel; ?>usercp.php">Settings</a> | <a href="<?php echo $rel; ?>member.php?action=logout&uid=<?php echo $mybb->user["uid"]; ?>">Logout</a>
<?php
}
else
{
?>
Hello Guest, <a href='<?php echo $rel; ?>member.php?action=login'>Sign In</a> - <a href='<?php echo $rel; ?>member.php?action=register'>Register</a>
- <a href='<?php echo $rel; ?>member.php?action=lostpw'>Forgot Password</a>
<?php
}
?>
It works fine when I use it on localhost. But when I use it online it doesn't work...
