SiXXGuNNZ
12-30-2002, 03:46 AM
okay I used this hack here to hide the register and user cp depending on if you are logged in or out, I also successfully modified it to hide the logout button from guests.
// guest/member register/usercp hack
if($bbuserinfo['userid'] != 0) {
$reg_ucp = "<a href=\"/forum/usercp.php?s=$session[sessionhash]\">".
"<img src=\"https://vborg.vbsupport.ru/images/top_profile.gif\" ".
"alt=\"Here you can view your subscribed threads, work with private messages and edit your profile and preferences\" ".
"border=\"0\"></a>";
}else{
$reg_ucp = "<a href=\"/forum/register.php?s=$session[sessionhash]&action=signup\">".
"<img src=\"https://vborg.vbsupport.ru/images/top_register.gif\" ".
"alt=\"Registration is free!\" border=\"0\"></a>";
}
// guest/member log out hack
if($bbuserinfo['userid'] != 0) {
$log_gone = "<a href=\"/forum/member.php?s=$session[sessionhash]&action=logout\">".
"<img src=\"https://vborg.vbsupport.ru/images/top_logout.gif\" ".
"alt=\"Logout\" border=\"0\"></a>";
}else{
$log_gone = "";
}
now when I apply the same principle to a admin cp button I get errors.
// admin button hack
if($bbuserinfo['userid'] != 6) {
$adcp = "<a href=\"/forum/admin/index.php?s=$session[sessionhash]\">".
"<img src=\"https://vborg.vbsupport.ru/images/top_admincp.gif\" ".
"alt=\"Admin CP\" border=\"0\"></a>";
}else{
$adcp = "";
}
what am I doing wrong?
edit: the above for the admincp works, but guests can also view it :\
// guest/member register/usercp hack
if($bbuserinfo['userid'] != 0) {
$reg_ucp = "<a href=\"/forum/usercp.php?s=$session[sessionhash]\">".
"<img src=\"https://vborg.vbsupport.ru/images/top_profile.gif\" ".
"alt=\"Here you can view your subscribed threads, work with private messages and edit your profile and preferences\" ".
"border=\"0\"></a>";
}else{
$reg_ucp = "<a href=\"/forum/register.php?s=$session[sessionhash]&action=signup\">".
"<img src=\"https://vborg.vbsupport.ru/images/top_register.gif\" ".
"alt=\"Registration is free!\" border=\"0\"></a>";
}
// guest/member log out hack
if($bbuserinfo['userid'] != 0) {
$log_gone = "<a href=\"/forum/member.php?s=$session[sessionhash]&action=logout\">".
"<img src=\"https://vborg.vbsupport.ru/images/top_logout.gif\" ".
"alt=\"Logout\" border=\"0\"></a>";
}else{
$log_gone = "";
}
now when I apply the same principle to a admin cp button I get errors.
// admin button hack
if($bbuserinfo['userid'] != 6) {
$adcp = "<a href=\"/forum/admin/index.php?s=$session[sessionhash]\">".
"<img src=\"https://vborg.vbsupport.ru/images/top_admincp.gif\" ".
"alt=\"Admin CP\" border=\"0\"></a>";
}else{
$adcp = "";
}
what am I doing wrong?
edit: the above for the admincp works, but guests can also view it :\