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

You are in: Forum / Forum / v2.08 / v2 Only Mods Complete

Unknown User
2009-03-27 14:11:04
SQL

ALTER TABLE `users` ADD `forum_access` DATETIME NOT NULL AFTER `last_access`;
In forums.php find


$forums_res = mysql_query("SELECT forumcats.id AS fcid, forumcats.name AS fcname, forum_forums.* FROM forum_forums LEFT JOIN forumcats ON forumcats.id = forum_forums.category ORDER BY forumcats.sort, forum_forums.sort, forum_forums.name") or die(mysql_error());





Above that add:



mysql_query("UPDATE users SET forum_access='" . get_date_time() . "' WHERE id={$CURUSER["id"]}");// or die(mysql_error());





Find



//Top posters



Above that add:

//Users active
$forum_t = gmtime() - 600; //you can change this value to whatever span you want

$forum_t = sqlesc(get_date_time($forum_t));

$res = mysql_query("SELECT id, username, class FROM users WHERE forum_access >= $forum_t ORDER BY forum_access DESC") or print(mysql_error());

while ($arr = mysql_fetch_assoc($res))

{

if ($forumusers) $forumusers .= ",\n";

switch ($arr["class"])

{

case 15:

$arr["username"] = "<font color=#011FFD>" . $arr["username"] . "</font>";

break;

case 14:

$arr["username"] = "<font color=#FD0113>" . $arr["username"] . "</font>";

break;

case 9:

$arr["username"] = "<font color=red>" . $arr["username"] . "</font>";

break;

case 8:

$arr["username"] = "<font color=red>" . $arr["username"] . "</font>";

break;

case 7:

$arr["username"] = "<font color=#03FCF3>" . $arr["username"] . "</font>";

break;

case 6:

$arr["username"] = "<font color=orange>" . $arr["username"] . "</font>";

break;

case 5:

$arr["username"] = "<font color=#FAFD01>" . $arr["username"] . "</font>";

break;

case 4:

$arr["username"] = "<font color=#FF00FF>" . $arr["username"] . "</font>";

break;

case 3:

$arr["username"] = "<font color=#03FC0F>" . $arr["username"] . "</font>";

break;

case 2:

$arr["username"] = "<font color=black>" . $arr["username"] . "</font>";

break;

case 1:

$arr["username"] = "<font color=#FA8072>" . $arr["username"] . "</font>";

break;

}

if ($CURUSER)

$forumusers .= "<a href=account-details.php?id=" . $arr["id"] . ">" . $arr["username"] . "</a></a>";

}

if (!$forumusers)

$forumusers = "There have been no active users in the last 15 minutes.";

?>

<br>

<table width=100% cellspacing=0 cellpadding=5><tr>

<td class="table_col1" align="left">Active Forum Simpsons</td></tr>

</tr><td class=table_col2>

<?=$forumusers?>

</td></tr>

</tr><td class=table_col1>

L

Sans_titre.jpg
Sans_titre.jpg
Unknown User
2009-03-28 05:00:44
Any chance the stats and etc can be put in english pelase ? ****EDIT**** Actually after looking at this code and using it, not only is it not in english it doesnt work, this simply displays the users online on the site as a whole not the actual forum, ill have a look at it and see what ican do with it to make it match the name of the post
Unknown User
2011-10-09 13:33:41
thanszxxx
Unknown User
2011-12-28 10:25:56
Hello I have a few worries. level of my forum I just added this mod and jai this error message

Thanks

Fatal error: Call to undefined function get_dt_num() in /hges/4/d9/htdocs/forums.php on line 1379

Torrenttrader.208
Unknown User
2011-12-28 13:40:00
try switching it to get_date_time() where that function is called
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: 9
  • Members: 0
  • Guests online: 9
  • Comments: 3
  • Messages: 1,728