PDA

View Full Version : [RELEASE vb2.0.3]Colored Online User Hack -> colored Buddies


Xenon
Sat 27th Oct '01, 9:00pm
Hi, i use the very cool Hack from Afterburner, but something is Missing: Extra Colors for Users on the Buddylist.

It can also stand alone, but with Afterburners Hack, its all inclusive ;)

just open the file index.php

after

$numbervisible=0;
$numberregistered=0;


add

//buddies feststellen
$buddyuserssql=str_replace(" ","' OR user.userid='",$bbuserinfo[buddylist]);
$sql="SELECT DISTINCT session.lastactivity, user.userid,username,session.userid AS online,invisible
FROM user
LEFT JOIN session ON session.userid=user.userid
WHERE (user.userid='$buddyuserssql')
ORDER BY username";
//$sql="SELECT * FROM user WHERE (userid='$buddyuserssql') AND invisible=0 ORDER BY username";
$buddys=$DB_site->query($sql);


after

} else {
$username=$loggedin['username'];
$invisibleuser = '';
}
//$location=$loggedin['location'];


add

// Abfrage ob Buddy dabei
while ($buddy=$DB_site->fetch_array($buddys)) {
if ($userid == $buddy['userid'] && $farbe == 2) {
$username = "<font color=darkgreen>".$username."</font>"; // Color for Buddies
}
}
$DB_site->free_result($buddys);
$buddy = '';
$buddys=$DB_site->query($sql);


after

if ($loggedin['invisible']==1) { // Invisible User but show to Admin
$username=$loggedin['username'];
$invisibleuser = '*';
} else {
$username=$loggedin['username'];
}
$location=$loggedin['location'];


add

// Abfrage ob Buddy dabei
while ($buddy=$DB_site->fetch_array($buddys)) {
if ($userid == $buddy['userid'] && $farbe == 2) {
$username = "<font color=darkgreen>".$username."</font>"; // Color for Buddies
}
}
$DB_site->free_result($buddys);
$buddy = '';
$buddys=$DB_site->query($sql);



Thats all :)
i dont know if it is the finest way to realize what i want, but it works :)