ok sorted and did redesign but 1 more problem i have made tables for a few things but is there a way of making the Buddies list show
"You Currently Have No Buddy"
if you have none heres the code what do i change
Code:
// start buddies
// -------------------------
$datecut = time() - $cookietimeout;
$buddyuserssql=str_replace(" ","' OR user.userid='",$bbuserinfo[buddylist]);
$sql="SELECT userid,username,invisible,lastactivity
FROM user
WHERE (user.userid='$buddyuserssql')
ORDER BY username";
$buddys=$DB_site->query($sql);
$onlineusers="";
$offlineusers="";
while ($buddy=$DB_site->fetch_array($buddys)) {
if ($doneuser[$buddy[userid]]) {
continue;
}
$doneuser[$buddy[userid]]=1;
if ((!$buddy[invisible] or $bbuserinfo['usergroupid']==6) and $buddy[lastactivity]>$datecut) {
$onoff="on";
$color="#00D200";
} else {
$onoff="off";
$color="#FF0000";
}
eval("\$var = \"".gettemplate("home_buddy2")."\";");
if ($onoff=="on") {
$onlineusers.=$var;
} else {
$offlineusers.=$var;
}
}
// -------------------------
// end buddies