Thank You (super work)
"XxBeliaLxX, post: 36447":not work for me in v2.2 , nothing show in my user online block !! you got a idee??not just the colors but no user ........ is empty
<?
//USERS ONLINE
begin_block("Users Online");
$file = "".$site_config["cache_dir"]."/cache_usersonlineblock.txt";
$expire = 600; // time in seconds
if (file_exists($file) &&
filemtime($file) > (time() - $expire)) {
$usersonlinerecords = unserialize(file_get_contents($file));
}else{
$usersonlinequery = mysql_query("SELECT id, username, class FROM users WHERE privacy !='strong' AND UNIX_TIMESTAMP('" . get_date_time() . "') - UNIX_TIMESTAMP(users.last_access) < 900") or die(mysql_error());
while ($usersonlinerecord = mysql_fetch_array($usersonlinequery) ) {
$usersonlinerecords[] = $usersonlinerecord;
}
$OUTPUT = serialize($usersonlinerecords);
$fp = fopen($file,"w");
fputs($fp, $OUTPUT);
fclose($fp);
} // end else
if ($usersonlinerecords == ""){
echo "No Users Online";
}else{
foreach ($usersonlinerecords as $user) {
switch($user["class"]){
case 1:
$color = "black";// user
break;
case 2:
$color = "yellow";// power user
break;
case 3:
$color = "red";// VIP
break;
case 4:
$color = "green";// uploader
break;
case 5:
$color = "brown";//moderator
break;
case 6:
$color = "orange";//super moderator
break;
case 7:
$color = "blue";// you and most trusted :)
break;
}
print("<a href=\"account-details.php?id=".$user["id"]."\"><font style=\" color: ".$color."\">".$user["username"]."</font></a>, ");
}
}
end_block();
?>"sliver, post: 39122":how can i get this working in the shoutbox?
"Sur, post: 42353":How to add stars at donators username, like in visitorstoday.php
Thanks
"SpaZiuR, post: 42367":Use search next time:
[url="http://www.torrenttrader.org/index.php?showtopic=7249"]http://www.torrenttrader.org/index.php?showtopic=7249[/url]
No users online
Torrents
Members
Online