Login
Username: Password:
Remember me

[Sign Up] / [Recover Password]

Theme / Language

Popular
New Torrents
new name
Size: 18.40 MB
Most active
new name
S: 74 L: 3
New Posters
online today
Controls ·  Search New posts · Mark unread

You are in: Forum / Forum / Torrent Trader / v3 Mods Requests

2019-10-20 11:28:27
Hello everyone, can you tell me if it is possible to make this module compatible from v2.8 to v3.0 members online today, thank you in advance for the follow-up :rolleyes:


[URL unfurl="true"]https://www.torrenttrader.xyz/index.php?threads/users-online-today.3905/[/url]
2019-10-20 12:29:27
Hi Niki

You can use this code there!


begin_frame("Online Members Currently ");
?>    
<?php
// Online in Offline by spiritblue
   $username = ( $anon == 'yes' || $CURUSER['privacy'] == 'strong' ) ? 'Anonymous' : class_user($CURUSER['username']);
   $query = SQL_Query_exec("SELECT `id`, `class`, `username`, `last_access` FROM `users` WHERE enabled = 'yes' AND status = 'confirmed' AND privacy !='strong' AND UNIX_TIMESTAMP('".get_date_time()."') - UNIX_TIMESTAMP(users.last_access) <= 900");
   // For class
   echo "<center><table width='99%' border='0'><tr><td>";
   while ($row = mysqli_fetch_array($query)){          
   echo "&nbsp;<span id='online' style='overflow: initial;height:100%;line-height:40px;margin:0 auto;'>&nbsp;<a href=account-details.php?id=".$row["id"]."'><b>".class_user($row["username"])."</b><img src='images/button_o".($row["last_access"] > $datetime ? "n":"ff")."line.png' border='0' /></a> </span>&nbsp;";
   }
   echo "<td/></tr></table></center>";
//End
?>
<?php
end_frame();
// End
[/code ]

2019-10-20 13:58:59
Merci [USER=401]spiritblue[/USER] et pouvez vous me dire si c'est possible d'afficher les membres qui on visité  le tracker des dernières  12  ou 24 heures, merci d'avance (y):)
2019-10-20 17:51:06
the visitors today block does that
TTv3 Micro Edition
Ubuntu 20.04.6 LTS Server
Mysql Version: 10.3.39-MariaDB-0ubuntu0.20.04.2
PHP Version: 7.4.3-4ubuntu2.20
Apache Version: Apache/2.4.59 (Ubuntu)
2019-10-20 23:40:52
"niki, post: 67389, member: 20338":

Merci [USER=401]spiritblue[/USER] et pouvez vous me dire si c'est possible d'afficher les membres qui on visité  le tracker des dernières  12  ou 24 heures, merci d'avance (y):)




begin_frame(T_("Users Online 24 Hours"));
$file = "".$site_config["cache_dir"]."/cache_usersonlineblock.txt";
$expire = 60; // time in seconds
if (file_exists($file) &&
   filemtime($file) > (time() - $expire)) {
   $usersonlinerecords = unserialize(file_get_contents($file));
}else{
$usersonlinequery = SQL_Query_exec("SELECT id, username, class, donated, warned FROM users WHERE privacy !='strong' AND UNIX_TIMESTAMP('" . get_date_time() . "') - UNIX_TIMESTAMP(users.last_access) < 86400");

   while ($usersonlinerecord = mysqli_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 = "yellow";// user
           break;
       case 2:
           $color = "green";// crazy seeder
           break;
       case 3:
           $color = "#00FF00";// nutty seeder
           break;
       case 4:
           $color = "#32CD32";// extreme seeder
           break;
       case 5:
           $color = "brown";// forum upper :)
           break;
       case 6:
           $color = "#CD853F";//light upper
           break;
       case 7:
           $color = "#8B4513";//extreme upper
           break;
       case 8:
           $color = "orange";// vip :)
           break;
           $color = "#6A5ACD";// forum moderator :)
           break;
       }

   $bimg2 = @mysqli_fetch_array(@mysqli_query("SELECT avatar FROM users WHERE id=$user[id]"));
   
   $avatar = ("$bimg2[avatar]");
if (!$avatar) {
   $avatar = "images/default_avatar.gif";
}  

       if ($user["donated"] > 0) { $star = " <img src=images/star.gif border=0>";
      } else {  
       $star = ""; }
        if ($user["warned"] != "no") { $warned = " <img src=images/warned.gif border=0>";
      } else {  
       $warned = ""; }
       print("<a href=\"account-details.php?id=".$user["id"]."\" target=\"_top\" style=\"text-decoration:none;\" onmouseover=\" return overlib('<table width=100%><tr><td><img src=".$avatar." width=120 height=120 border=0>', CENTER);\" onmouseout=\"return nd();\"><font style=\" color: ".$color."\">".$user["username"]."</font></a>$star$warned, ");
   }
}
end_frame();
//End

2020-02-14 03:47:44
Why wouldn’t you bind the queries and reduce all the code?
Users online

No users online

Search



Statistics

    Torrents

  • Tracking: 3
  • Todays torrents: 0
  • Seeders: 0
  • Leechers: 0
  • Peers: 0
  • Downloaded: 89.96 GB
  • Uploaded: 9.86 GB

  • Members

  • We have: 838
  • New today: 0
  • Guest today: 9

  • Online

  • Total online: 4
  • Members: 0
  • Guests online: 4
  • Comments: 3
  • Messages: 1,728