This may look like alot but it all depends on what mods you have already installed!
DONT FORGET TO BACK IT ALL UP
firsst replace all the code in advanced stats with this
now if you ahve the[url="
http://www.torrenttrader.org/index.php?showtopic=8800&hl=forum"] forum mod installed[/url] under
if you have the mod that l[url="
http://www.torrenttrader.org/index.php?showtopic=3488&hl=iplog"]ogs all the ips that a user uses[/url] then below
[url="
http://www.torrenttrader.org/index.php?showtopic=9095&hl=friend"]Affiliates block/mod added[/url] then below
<?
begin_block("Stats");
$date_time = get_date_time(gmtime()-(3600*24)); // the 24hrs is the hours you want listed
$registered = number_format(get_row_count("users"));
$ncomments = number_format(get_row_count("comments"));
$nmessages = number_format(get_row_count("messages"));
$trackers = number_format(get_row_count("announce"));
$ntor = number_format(get_row_count("torrents"));
$totaltoday = number_format(get_row_count("users", "WHERE users.last_access>='$date_time'"));
$regtoday = number_format(get_row_count("users", "WHERE users.added>='$date_time'"));
$todaytor = number_format(get_row_count("torrents", "WHERE torrents.added>='$date_time'"));
$guests = number_format(getguests());
$seeders = number_format(get_row_count("peers", "WHERE seeder='yes'"));
$leechers = number_format(get_row_count("peers", "WHERE seeder='no'"));
$members = number_format(get_row_count("users", "WHERE UNIX_TIMESTAMP('" . get_date_time() . "') - UNIX_TIMESTAMP(users.last_access) < 900"));
$totalonline = $members + $guests;
$bans = number_format(get_row_count("bans"));
$languages = number_format(get_row_count("languages"));
$admins = number_format(get_row_count("users", "WHERE class=8"));
$leaders = number_format(get_row_count("users", "WHERE class=7"));
$super = number_format(get_row_count("users", "WHERE class=6"));
$mod = number_format(get_row_count("users", "WHERE class=5"));
$up = number_format(get_row_count("users", "WHERE class=4"));
$vip = number_format(get_row_count("users", "WHERE class=3"));
$pwr = number_format(get_row_count("users", "WHERE class=2"));
$user = number_format(get_row_count("users", "WHERE class=1"));
$ext = number_format(get_row_count("torrents","WHERE external='yes'"));
$int = number_format(get_row_count("torrents","WHERE external='no'"));
$warn1 = number_format(get_row_count("warnings"));
$warn2 = number_format(get_row_count("users","WHERE warned='yes'"));
$ip = number_format(get_row_count("iplog"));
$board = number_format(get_row_count("forum_forums "));
$topic = number_format(get_row_count("forum_topics"));
$posts = number_format(get_row_count("forum_posts"));
$com = number_format(get_row_count("completed"));
$afil = number_format(get_row_count("affil"));
$result = mysql_query("SELECT SUM(downloaded) AS totaldl FROM users");
while ($row = mysql_fetch_array ($result)) {
$totaldownloaded = $row["totaldl"];
}
$result = mysql_query("SELECT SUM(uploaded) AS totalul FROM users");
while ($row = mysql_fetch_array ($result)) {
$totaluploaded = $row["totalul"];
}
$localpeers = $leechers+$seeders;
$warn = $warn1+$warn2;
echo "<div align=left>";
echo "<B>Torrents</B>";
echo "<br><small>Tracking:<B> " . $ntor . " Torrents</b></small>";
echo "<br><small>External: <b>" . $ext . "</b></small>";
echo "<br><small>Internal: <b>" . $int . "</b></small>";
echo "<br><small>New Today:<B> " . $todaytor . "</b></small>";
echo "<br><small>Trackers:<B> " . $trackers . "</b></small>";
echo "<br><small>Local Seeders:<B> " . $seeders . "</b></small>";
echo "<br><small>Local Leechers:<B> " . $leechers . "</b></small>";
echo "<br><small>Local Peers:<B> " . $localpeers . "</b></small>";
ECHO "<br><small>Downloaded:<B> " . mksize($totaldownloaded) . "</b></small>";
ECHO "<br><small>Uploaded:<B> " . mksize($totaluploaded) . "</b></small>";
echo "<br><small>Completed:<B> " . $com . "</b></small>";
echo "<br><br><B>Members</B>";
echo "<br><small>We Have:<B> " . $registered . " Members</b></small>";
echo "<br><small>New Today:<B> " . $regtoday . "</b></small>";
echo "<br><small>Visited Today: <B>" . $totaltoday . "</b></small>";
echo "<br><br><B>Online</B>";
echo "<br><small>Total:<B> " . $totalonline . "</b></small>";
echo "<br><small>Members:<B> " . $members . "</b></small>";
echo "<br><small>Guests:<B> " . $guests . "</b></small>";
echo "<br><small>Comments Posted:<B> " . $ncomments . "</b></small>";
echo "<br><small>Messages Sent:<B> " . $nmessages . "</b></small>";
echo "<p><B>Other</B>";
echo "<br><small>Bans:<B>" . $bans . "</b></small>";
echo "<br><small>languages:<B>" . $languages . "</b></small>";
echo "<br><small>warnings:<B>" . $warn . "</b></small>";
echo "<p><B>Members</b>";
echo "<br><small><font color=aqua>Admins: <b>" . $leaders . "</b></small>";
echo "<br><small><font color=orange>Super Moderators: <b>" . $super . "</b></small>";
echo "<br><small><font color=brown>Moderators: <b>" . $mod . "</b></small>";
echo "<br><small><font color=red>Uploaders: <b>" . $up . "</b></small>";
echo "<br><small><font color=green>VIP: <b>" . $vip . "</b></small>";
echo "<br><small><font color=purple>Power User: <b>" . $pwr . "</b></small>";
echo "<br><small><font color=white>User: <b>" . $user . "</b></small>";
echo "<br><br></div>";
end_block();
?>
This will add amount of internal and external torents how many warnings there are how many bans and how many languages and amount of completed torrents also how many of each user class their is see pic
echo "<br><small>warnings:<B>" . $warn . "</b></small>";
add
echo "<p><B>Forum Stats</B>";
echo "<br><small>Posts:<B>" . $posts . "</b></small>";
echo "<br><small>Topics:<B>" . $topic . "</b></small>";
echo "<br><small>Boards:<B>" . $board . "</b></small>";
will now lok like this
echo "<br><small>warnings:<B>" . $warn . "</b></small>";
add
echo "<br><small>Individual Visits:<B>" . $ip . "</b></small>";
if you have the
echo "<br><small>warnings:<B>" . $warn . "</b></small>";
add
echo "<br><small>Affiliates:<B>" . $afil . "</b></small>";
and will now look like this if all are installed!