View Full Version : Quick Forum Statistics in AdminCP
assassingod
08-30-2003, 10:00 PM
Quick Forum Statistics in AdminCP
Author: assassingod
Description: This is a simple and easy way to view some basic statistics to your forum. You can find a list of 5 stats in your AdminCP.
User Stats - Top Poster, Top Thread Starter, Newest Member, Members Online
Forum Stats - Board Name, Board URL, Board Active, Total Threads, Total Posts, Total Members
Misc. Stats - Most Used Avatar, Total Character in posts, Total Views, Attachment Usage (in bytes)
Thread Stats - Most Viewed Thread, Most Replied Thread, Latest Thread
Database Stats - DB name, DB size, DB tables inc each table size
Credits: I would like to thank N9ne for letting me use his 'Most Avatar Used' hack - thanks buddy:)
Latest Version:
1.3
IF YOU USE THIS HACK DO NOT FORGOT TO CLICK THE INSTALL (https://vborg.vbsupport.ru/misc.php?s=&action=install&threadid=56658) BUTTON - THANKS YOU:)
assassingod
08-31-2003, 09:11 PM
Screenshots
NTLDR
08-31-2003, 09:14 PM
IMO would be better all on one page :) Good job none the less :D
assassingod
08-31-2003, 09:15 PM
Thanks - My original intention was it to be all on one page, but it would add up to 20 queries, so I left it and made seperate pages:)
Good job Steve :).
@ Lee: if it was all on one page it would be quite a query-intensive page and not good for active forums/servers :).
NTLDR
08-31-2003, 09:26 PM
Not that many IMO taking into account the number of views it will get ;)
ETA: vB3 ACP Home has 21 queries if the Admin Stats are enabled ;)
SlayersClock
09-01-2003, 12:17 AM
Nice hack :)
* SlayersClock installs
Just want to point out to you that in the instructions you say to open admin/forum.php but to save admin/index.php :)
SmEdD
09-01-2003, 04:36 AM
Yesterday at 06:17 PM N9ne said this in Post #5 (https://vborg.vbsupport.ru/showthread.php?postid=430193#post430193)
@ Lee: if it was all on one page it would be quite a query-intensive page and not good for active forums/servers :).
How not like there gonna have 100 admins ;)
Also the the index.php page is like 18 normally. I say 25 is my max for a public page and 40 for non public.
And nice hack but I also say it should be on one page :)
assassingod
09-01-2003, 05:49 AM
Today at 02:17 AM SlayersClock said this in Post #7 (https://vborg.vbsupport.ru/showthread.php?postid=430242#post430242)
Nice hack :)
* SlayersClock installs
Just want to point out to you that in the instructions you say to open admin/forum.php but to save admin/index.php :)
Thanks, will change.
As for all stats on one page, I may do that:)
Yes but the 20 queries there would be if it was all on one page are more intensive than forumhome, because the queries are a little more intensive.
assassingod
09-01-2003, 10:22 AM
Thats true, I'll probably need some BETA testers for the stats on one page. I can't test it myself since I havent got a board.
assassingod
09-01-2003, 11:24 AM
<font color="red">Update</font>
Changed $bbactive status (Now says Yes/No instead of 1/0)
Credits - hellsatan
Morpheus84
09-01-2003, 05:59 PM
When you would like to add the database size statistic ?
assassingod
09-01-2003, 06:09 PM
As soon as I figure out how to. My previous DataBase stats hack code may work, but I'll have to configure it to work with vB. Although I can have an attempt at that later tonight:)
Hobbes
09-01-2003, 09:33 PM
nice hack :D
* Hobbes installs
assassingod
09-01-2003, 09:35 PM
Thanks:)
No further updates on DB Size.
Btw, if you are interested in BETA testing this hack with all that stats on one page, PM me.
Sebastian
09-07-2003, 06:38 AM
here is a script i made that you can use to get the overall database size, even shows you how much space each table is using, feel free to use it.
$dbhost = 'localhost';
$dbuser = 'username';
$dbpass = 'password';
$database = 'database';
mysql_connect($dbhost,$dbuser,$dbpass) or die ('unable to connect');
mysql_select_db($database) or die('unable to select database');
$result = mysql_query("show table status");
$total = 0; $table= '';
while($status = mysql_fetch_array($result)) {
$total += ($status['Data_length'] + $status['Index_length']);
$tables .= $status['Name']. ' : ' .number_format(($status['Data_length']/1024), 2). "kb<br />\n";
}
$total = number_format(($total/1024)/1024, 1);
echo $tables ."<br />\n Total size for " . $database .' (<b> '. $total .' MB </b>)';
assassingod
09-07-2003, 07:56 AM
Thanks Sebastian. I'll try it soon:)
assassingod
09-07-2003, 09:46 AM
Version 1.3 out
Includes:
New DB stats - DB Name, DB size and DB tables with each table size
assassingod
09-07-2003, 09:51 AM
Check 2nd post for updated screenshots
Areku
09-09-2003, 11:02 AM
I get a corrupted ZIP for the screenshots... just me?
assassingod
09-09-2003, 02:00 PM
I'll wait for this to be confirmed.
(May because of some errors when uploading yesterday)
assassingod
09-11-2003, 03:38 PM
Updated uploads.
dethfire
09-21-2003, 12:25 AM
Warning: mysql_connect(): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) in /htdocs/www/admin/statistics.php on line 138
unable to connect
assassingod
09-21-2003, 07:07 AM
dethfire:
In statistics.php search for "start get DB size" (Line 132)
Below that is some DB information, fill it in.
(I required config.php but forgot to use its variables)
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.