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
Users Online Today
Controls ·  Search New posts · Mark unread

You are in: Forum / Forum / v2.08 / v2.08 Mods Completed

Unknown User
2012-08-12 19:47:06
ill remove the mod from my site theres no theme css for it and its not cleaning up as well

Users Online Today
Unknown User
2013-02-25 22:05:40
THANK you! works great Tiloup

And of course thanks to MVP
Unknown User
2013-04-11 01:30:00
getting error



Parse error: syntax error, unexpected '=', expecting T_STRING in /home/pimp4003/public_html/index.php on line 197






this is line 197







class='searchlite'>class='searchlite'>class='searchlite'>class='searchlite'>class='prettyprint'>// Utilisateurs en ligne aujourd_hui

Unknown User
2013-04-11 13:36:05
looks like you have 5 class= defines in an line that needs 1.. post your full lines 195-198
2020-11-30 19:25:04
Bonsoir voici le code du block usersonline_block.php pour avoir les membres horizontalement (y):D


<?php

if ( get_user_class() >= 7 ) {

begin_block(T_("ONLINE_USERS"));

$expires = 1200; // Cache time in seconds

if (($rows = $TTCache->Get("usersonline_block", $expires)) === false) {
   $res = SQL_Query_exec("SELECT id, username FROM users WHERE enabled = 'yes' AND status = 'confirmed' AND privacy !='strong' AND UNIX_TIMESTAMP('".get_date_time()."') - UNIX_TIMESTAMP(users.last_access) <= 1200");

   $rows = array();
   while ($row = mysqli_fetch_assoc($res)) {
       $rows[] = $row;
   }

   $TTCache->Set("usersonline_block", $rows, $expires);
}

if (!$rows) {
   echo T_("NO_USERS_ONLINE");
} else {

echo "<div id='uOnline' class='bMenu'><ul>\n";;
   for ($i = 0, $cnt = count($rows), $n = $cnt - 1; $i < $cnt; $i++) {
       $row = &$rows[$i];
       echo "<centeer><a href='account-details.php?id=$row[id]'>


" . class_user($row[username]) . "

</a>".($i < $n ? ", " : "")."</center>\n";;
   }
       echo "

</div>\n";;
}

end_block();

}

?>
2020-12-01 02:28:52
No need to use PHP to calculate row count, you can use this query to do that and reduce extra code.

This shows the last logged in (15 minutes). You can keep the old query if you need, but be sure to add COUNT(id) AS totalcount in your old query

SELECT COUNT(id) AS totalcount, username FROM users WHERE last_access >= DATE_SUB(NOW(), INTERVAL 15 MINUTE)


So you call 'totalcount' and you get your online count. This is also easier to understand and compatible for most versions.

Also, the use of referential assignment operator:
[color=rgb(84, 172, 210)]=&[/color]
is depreciated and will throw warnings. Easy to fix. This was a PHP 4 thing back in the day.

Try this:


<?php
if (get_user_class() >= 7) {
   begin_block(T_("ONLINE_USERS"));
   $expires = 1200;
   if (($rows = $TTCache->Get("usersonline_block", $expires)) === false) {
       $res = SQL_Query_exec("SELECT COUNT(id) AS totalcount, id, username FROM users WHERE enabled = 'yes' AND status = 'confirmed' AND privacy !='strong' AND last_access >= DATE_SUB(NOW(), INTERVAL 15 MINUTE)");
       foreach (mysqli_fetch_assoc($res) as $row) {
           $rows = $row;
           if (array_key_exists('id', $row)) {
               print("<div id='uOnline' class='bMenu'> - Total: " . $row['totalcount']); // Count the total online
               print("<span style='text-align:center'><a href='account-details.php?id=$row[id]'>" . class_user($row['username']) . "</a></span>");
           } else {
               echo T_("NO_USERS_ONLINE");
           }
       }
       $TTCache->Set("usersonline_block", $rows, $expires);
   }
   end_block();
}
?>
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: 1
  • Members: 0
  • Guests online: 1
  • Comments: 3
  • Messages: 1,728