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-07-04 23:01:58
Upgraded for v2.08



begin_frame( T_("ONLINE_USERS_TODAY") );



$expires = 900; // Cache time in seconds





if (($rows = $TTCache->Get("usersonlinetoday_block", $expires)) === false) {

$res = SQL_Query_exec("SELECT id, username, class, donated, warned FROM users WHERE enabled = 'yes' AND status = 'confirmed' AND privacy !='strong' AND UNIX_TIMESTAMP('".get_date_time()."') - UNIX_TIMESTAMP(users.last_access) <= 86400");



$rows = array();

while ($row = mysql_fetch_assoc($res)) {

$rows[] = $row;

}



$TTCache->Set("usersonlinetoday_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];



switch ( $row['class'] )

{

case 7:

$color = 'red';

break;



case 6:

$color = 'brown';

break;



case 5:

$color = 'yellow';

break;



case 4:

$color = 'purple';

break;



case 3:

$color = 'gold';

break;



case 2:

$color = 'blue';

break;



case 1:

$color = 'green';

break;

}



$warned = null;



if ( $row['warned'] == 'yes' )

{

$warned = '<img src="images/warned.png" alt="Warned" title="Warned" border="0" />';

}



$donated = null;



if ($row['donated'] > 0)

{

$donated = '<img src="images/star.png" alt="Donated" title="Donated" border="0" />';

}





echo "<li><a href='account-details.php?id=$row[id]'><font style='color: ".$color."'>$row[username]</font> $warned $donated</a>".($i < $n ? ", " : "")."</li>n";;

}

echo "</ul></div>n";;

}



end_frame();






Add to languages/english.php before closing php tag







$LANG["ONLINE_USERS_TODAY"] = "Users Online Today";






Includes user class color, donated star for donators, warned pic for warned users... and of course if you use cooly's class_user function your better of copying the users online block from blocks and changing







UNIX_TIMESTAMP(users.last_access) <= 900






to







UNIX_TIMESTAMP(users.last_access) <= 86400






And changing







$row[username]






to







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

2012-07-05 02:37:29
Thanks you! :)
2012-08-06 23:43:12
using this as a block, works great, cant believe I missed this one. thanks
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)
2012-08-07 00:02:06
My personal change! LOL :)

Captuffre.PNG
Captuffre.PNG

Unknown User
2012-08-11 13:24:04
would you add your block here please tiloup as i add this to the index and not going as i want trying to add it like yours many thax
2012-08-11 15:03:40
not such a block but it is a add index.php

"spank-d, post: 84671":
would you add your block here please tiloup as i add this to the index and not going as i want trying to add it like yours many thax
not such a block but it is a add index.php
Unknown User
2012-08-11 17:39:17
"tiloup, post: 84682":
not such a block but it is a add index.php

not such a block but it is a add index.php

yes i like yours too is it poss to have it ?
2012-08-11 18:00:56
// Utilisateurs en ligne aujourd_hui

if (!$site_config["MEMBERSONLY"] || $CURUSER) {

begin_frame( T_("ONLINE_USERS_TODAY") );



$expires = 900; // Cache time in seconds





if (($rows = $TTCache->Get("usersonlinetoday_block", $expires)) === false) {

$res = SQL_Query_exec("SELECT id, username, class, donated, warned FROM users WHERE enabled = 'yes' AND status = 'confirmed' AND privacy !='strong' AND UNIX_TIMESTAMP('".get_date_time()."') - UNIX_TIMESTAMP(users.last_access) <= 86400");



$rows = array();

while ($row = mysql_fetch_assoc($res)) {

$rows[] = $row;

}



$TTCache->Set("usersonlinetoday_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];



switch ( $row['class'] )

{

case 8:

$color = '#2090FF';

break;



case 7:

$color = '#FF0000';

break;



case 6:

$color = '#33FF33';

break;



case 5:

$color = '#40E0D0';

break;



case 4:

$color = '#006600';

break;



case 3:

$color = '#FEDE01';

break;



case 2:

$color = '#C0C0C0';

break;



case 1:

$color = '#FFFFFF';

break;

}



$warned = null;



if ( $row['warned'] == 'yes' )

{

$warned = '<img src="images/warned.png" alt="Warned" title="Warned" border="0" />';

}



$donated = null;



if ($row['donated'] > 0)

{

$donated = '<img src="images/star.png" alt="Donated" title="Donated" border="0" />';

}





echo "<a href='account-details.php?id=$row[id]'><font style='color: ".$color."'>" . class_user($row["username"]) . "</font> $warned $donated</a>".($i < $n ? "," : "")."n";;

}

echo "</ul></div>n";;

}



// online users

print("<div class='f-cat' width='100%' align='center'>".T_("ONLINE_USERS")."</div>");

$expires = 600; // 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) <= 900");



   $rows = array();

   while ($row = mysql_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 "<li><a href='account-details.php?id=$row[id]'>" . class_user($row["username"]) . "</a>".($i < $n ? ", " : "")."</li>n";;

   }

       echo "</ul></div>n";

}

// END online users



// Rang et simbol

print("<div class='f-cat' width='100%' align='center'>".T_("CLASS_LEGENDS")."</div>");



echo "<div align='center'><span style='font-size:medium;'><table class='table_head1' width='75%' align='center' cellpadding='1' cellspacing='1' border='0' valign='top'><tr><td align='center' width='110'></table></span>

   <br />

<span style='color:#FFFFFF'>".T_("MEMBER")."</span> | <span style='color:#C0C0C0'>".T_("SUPER_MEMBER")."</span> | <span style='color:#006600'>".T_("UPLOADER")."</span> | <span style='color:#FEDE01'>".T_("VIP")."</span> | <span style='color:#40E0D0'>".T_("MODERATOR")."</span> | <span style='color:#33FF33'>".T_("SUPER_MODERATOR")."</span> | <span style='color:#2090FF'>".T_("ENCODOR")."</span> | <span style='color:#FF0000'>".T_("ADMINISTRATOR")."</span>

   <br />

<hr width='85%' align='center' size='3' />

<img src="images/warn.png" title="Vous avez eu une avertissement du staff!!"><span style='color:#FF0000'><i> Avertissement</i></span> | <img src="images/star.png" title="Vous avez contribué a la réussite du site!"><span style='color:#FF0000'><i> Donateur</i></span> | <img src="images/seedbox.png" title="Torrent qui proviens d'une seedbox a débit très élever!" width="20" height="18"><span style='color:#FF0000'><i> SeedBox</i></span> | <img src="images/free.gif" title="Téléchargement gratuit a 100%"><span style='color:#FF0000'><i> FreeLeech 100%</i></span> | <img src="images/silver.gif" title="Téléchargement gratuit a 50%"><span style='color:#FF0000'><i> FreeLeech 50%</i></span> | <img src="images/new_torrent.png" title="Nouveau torrent!"><span style='color:#FF0000'><i> Nouveau Torrent</i></span></div><br/>n";

// End Rang et simbol



end_frame();

}

// END Utilisateurs en ligne aujourd_hui


Unknown User
2012-08-11 19:01:37
your a star many thax

is the a lang  for ? print("<div class='f-cat' width='100%' align='center'>".T_("CLASS_LEGENDS")."</div>");
2012-08-11 20:46:49
Yes symbols = Legends! :)

Capture.PNG
Capture.PNG

Unknown User
2012-08-11 21:48:36
"tiloup, post: 84704":
Yes symbols = Legends!


ALL FIXED MANY THAX FOR LOVLY MOD
Unknown User
2012-08-12 15:30:03
OK do we have fix for the Online Users as you can see it is vertical



would like it as

Horizontal

GGFGG.png
GGFGG.png
2012-08-12 16:11:16
je n'est pas ca moi, verifier ci vous avez pas un <br> ?

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

I do not ca me check it you have not <br> ?
Unknown User
2012-08-12 17:04:57


echo "<a href='account-details.php?id=$row[id]'><font style='color: ".$color."'>" . class_user($row["username"]) . "</font> $warned $donated</a>".($i < $n ? "," : "")."n";;

}

echo "</ul></div>n";;

}

// online users

print("<div class='f-cat' width='100%' align='center'>".T_("ONLINE_USERS")."</div>");

$expires = 600; // 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) <= 900");

   $rows = array();

   while ($row = mysql_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 "<li><a href='account-details.php?id=$row[id]'>" . class_user($row["username"]) . "</a>".($i < $n ? ", " : "")."</li>n";;

   }

   echo "</ul></div>n";

}

// END online users







?
2012-08-12 18:58:55
Sorry I do not understand you vertically and not me? look to your theme ... can be?
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