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 Database Stats (https://vborg.vbsupport.ru/showthread.php?t=51828)

assassingod 04-18-2003 10:00 PM

Quick Database Stats
 
Quick Database Stats

Author: assassingod

Description: This hacks gives a quick list of database stats for your forums. Includes name and ammount of MB its using.

Credits: Sebastian

Screenshots:
https://vborg.vbsupport.ru/attachmen...&postid=431944


Tested on vB version:
2.3.2
2.3.0
2.2.9

If you use this hack please click the INSTALL button - thank you!

Chris M 04-19-2003 04:53 PM

Nice:)

Satan

Zelda-King 04-19-2003 05:28 PM

I installed it but it says;
Quote:

Database Stats gamercrossfire_net (Using ERROR! MB of space)
:/

assassingod 04-19-2003 05:35 PM

There are some comments on line 5 and 7

Try following those instructions and see if it works:)

amykhar 04-19-2003 05:43 PM

I ended up having to hard code in my username and password to get it to work. The localhost line didn't have to change for me though.

Amy

assassingod 04-19-2003 06:07 PM

Maybe I should have kept 'require("./config"); '?
I'll test it out

Zelda-King 04-19-2003 06:41 PM

I'm fine now. I neglected to look for configurables. Sorry about that!

assassingod 04-19-2003 06:44 PM

Glad to here its working:)

yxboom 04-20-2003 04:57 AM

Working fine.

Boofo 04-20-2003 05:34 AM

When I hard-coded my username and password in, this is the error I got:

Warning: mysql_query(): 5 is not a valid MySQL-Link resource in /home/bear/public_html/forum/admin/db_mysql.php on line 86

If I don't hardcode it, it get the line

(Using ERROR! MB of space)

gmarik 04-20-2003 07:57 AM

Nice, nice, nice!

assassingod 04-20-2003 09:46 AM

Quote:

Today at 06:34 AM Boofo said this in Post #11
When I hard-coded my username and password in, this is the error I got:

Warning: mysql_query(): 5 is not a valid MySQL-Link resource in /home/bear/public_html/forum/admin/db_mysql.php on line 86

If I don't hardcode it, it get the line

(Using ERROR! MB of space)

Did you check the comments on lines 5 and 7?

alkatraz 04-20-2003 07:46 PM

I get this error
Quote:

arning: mysql_query(): 1 is not a valid MySQL-Link resource in /home/alkatraz/www/board/admin/db_mysql.php on line 93
even after changing all the user/pass/server vars in script.

No worries, I removed the hack anyways. But good idea!

assassingod 04-20-2003 08:04 PM

Not too sure why you got that error:confused:
Oh well:(

N9ne 04-20-2003 09:04 PM

Maybe it only works on certain OS's?

assassingod 04-20-2003 09:07 PM

Maybe - Some say it work some say it dont.

Weird

Kriek 04-21-2003 02:31 AM

PHP Code:

$db mysql_connect($db_host$db_usr$db_pwd) or die (mysql_error());
mysql_select_db($tdb$db) or die (mysql_error()); 

mysql_error() will give a more specific error to work with; definitely a life saver for me. Hope this helps.

Boofo 04-21-2003 02:34 AM

Quote:

Today at 04:46 AM assassingod said this in Post #13
Did you check the comments on lines 5 and 7?
Yes, I did. When I do it that way, I get some strange db error about a lastpost or something and all of the text on the page suddenly goes to smallfont. Wierd.

Kriek 04-21-2003 03:16 AM

Quote:

Today at 03:46 PM alkatraz said this in Post #14
not a valid MySQL-Link resource
$tdb MUST equal your database name.

I'm willing to bet that mysql_error() will return "No database selected" ;)

Sanjiyan 04-21-2003 05:42 AM

Installed just fine, but how do I shorted the MB feedback?

At the moment it looks like this:

Database Stats borg (Using 1.0523281097412 MB of space)

How do I get it to go to: 1.23 MB

assassingod 04-21-2003 09:21 AM

Quote:

Today at 03:34 AM Boofo said this in Post #19
Yes, I did. When I do it that way, I get some strange db error about a lastpost or something and all of the text on the page suddenly goes to smallfont. Wierd.
Do you have anything else installed in your admin CP? I can't think why its doing that.:confused: I'll look into it more

Quote:

Today at 03:31 AM Kriek said this in Post #18
PHP Code:

$db mysql_connect($db_host$db_usr$db_pwd) or die (mysql_error());
mysql_select_db($tdb$db) or die (mysql_error()); 

mysql_error() will give a more specific error to work with; definitely a life saver for me. Hope this helps.

Thanks Kriek !!


Quote:

Today at 06:42 AM Sanjiyan said this in Post #21
Installed just fine, but how do I shorted the MB feedback?

At the moment it looks like this:

Database Stats borg (Using 1.0523281097412 MB of space)

How do I get it to go to: 1.23 MB

I will look into it:)

iwearnosox 04-21-2003 09:51 AM

This will return the correct DB size after hard coding name and password for me but then it spews out:

Warning: mysql_query(): 1 is not a valid MySQL-Link resource in /path/admin/db_mysql.php on line 86

This error disappears after removing this hack. I have a 2.3 board.

Kriek 04-21-2003 08:23 PM

iwearnosox, let me break your error down for you ;)

mysql_query() throws an error because $result = mysql_query($sql_result); this can not be run because $sql_result = "SHOW TABLE STATUS FROM " .$tdb; and the $tdb variable MUST contain your database name which is in mysql_select_db($tdb, $db); so the connection is broken, because the $tdb variable is incorrect.

As I've already stated in my previous comments from this thread [1][2] that error is specifically caused because the connection to the database was prevented either in mysql_connect() or mysql_select_db() and using mysql_error() will specifically output the error causing the problem.

iwearnosox 04-21-2003 08:32 PM

Thanks for the added info. I'm going on no sleep for like 36 hours now so any attempt at a reasonable reply is beyond me. Once I sleep I'll check back in and try to understand what you just said. :)

Kriek 04-22-2003 11:27 PM

Starbucks coffee and ice cream in a blender does the trick for me.

59 hrs without sleep, hoping for at least 3 hrs soon.

Tungsten 04-23-2003 02:57 PM

Works great "out of the box" with 2.2.8 running on a Windows 2000 / IIS5 installation.

/me licks install

Sanjiyan 04-24-2003 12:20 PM

assassingod,

Any luck with narrowing down the number of decimal points I posted a few days ago?

ie 1.23 MB instead of 1.23456789 MB

assassingod 04-24-2003 02:18 PM

Not yet - If anyone knows too, would you kindly share how to?

Still working on a new version

Boofo 04-30-2003 02:29 PM

Any luck on the new version?

assassingod 04-30-2003 02:46 PM

Not as yet no.

Its the next thing on my list i assure you:)

assassingod 05-11-2003 08:57 AM

REMOVED UNTIL ALL BUGS ARE FIXED

The [real] final version is being worked on now.

assassingod 09-07-2003 09:35 AM

<font color="red">Updated the v3</font>

This should be a working version. I've tested it and there appears the be NO errors.

Let me now if anything is wrong.

assassingod 09-07-2003 09:35 AM

Screenshot


All times are GMT. The time now is 05:02 AM.

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.01357 seconds
  • Memory Usage 1,784KB
  • 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
  • (2)bbcode_php_printable
  • (8)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (33)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