vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Quick Forum Statistics in AdminCP (https://vborg.vbsupport.ru/showthread.php?t=56658)

assassingod 08-30-2003 10:00 PM

Quick Forum Statistics in AdminCP
 
[HIGH]Quick Forum Statistics in AdminCP[/HIGH]

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.
  1. [high]User Stats[/high] - Top Poster, Top Thread Starter, Newest Member, Members Online
  2. [high]Forum Stats[/high] - Board Name, Board URL, Board Active, Total Threads, Total Posts, Total Members
  3. [high]Misc. Stats[/high] - Most Used Avatar, Total Character in posts, Total Views, Attachment Usage (in bytes)
  4. [high]Thread Stats[/high] - Most Viewed Thread, Most Replied Thread, Latest Thread
  5. [high]Database Stats[/high] - 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 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:)

N9ne 08-31-2003 09:17 PM

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 :)
[high]* SlayersClock installs
[/high]

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

Quote:

Yesterday at 06:17 PM N9ne said this in Post #5
@ 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

Quote:

Today at 02:17 AM SlayersClock said this in Post #7
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:)

N9ne 09-01-2003 09:59 AM

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

[high]* Hobbes installs[/high]

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.

PHP Code:

$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)/10241);

  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)


All times are GMT. The time now is 04:44 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01699 seconds
  • Memory Usage 1,769KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (25)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete