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

ap0c 04-20-2003 01:23 AM

nice Bane, thanks

irn-bru 04-20-2003 02:56 PM

I installed this hack a long time ago.

2 questions.

Is it wise to have vbstats.php?action=phpinfo
I mean anyone can check your phpinfo is this
unsafe or Iam I just paraniod :confused:

Also O when O when can we have a update please
this hack is so great and I love it. I am looking for
the style and myinfo to be updated and all the the
other neat stuff at the makers vb board..hehe.

Jacko 04-23-2003 08:43 AM

working great on a 2.2.9 modified board:

http://www.realmods.net/forum/vbstat...ction=stats&s=

Jacko 04-23-2003 09:24 AM

ok i ventured into adding some stats onto my forumhome template and this is what i added to my "index.php" file:

Quote:

// BEGIN vbStats Hack [230.01]
// Active/Non?
$activemembers=$numbermembers-$nonposters;
$activityrate=sprintf("%.2f",(100*$activemembers/$numbermembers));

// Staff
$anum = mysql_num_rows(mysql_query("select * from user WHERE usergroupid=5 or usergroupid=6 or usergroupid=7"));

// Total
$totalposts=$countposts['posts'];
if ($totalposts=='') { $totalposts=0; }
$totalthreads=$countthreads['threads'];
if ($totalthreads=='') { $totalthreads=0; }

// Today [FireFly]
$getpoststoday=$DB_site->query_first("SELECT count(*) AS count FROM post WHERE dateline>='$tltoday'");
$poststoday=$getpoststoday[count];

eval("$vbstats = "".gettemplate('vbstats_forumhome')."";");
// END vbStats Hack [230.01]
then i added the following to my forumhome template:

Quote:

Active Members: $activemembers
Activity Level: $activityrate%

Total Threads: $totalthreads
Total Posts: $totalposts
Posts Today: $poststoday

Staff Members: $anum
and this is the end result:
http://www.realmods.net/stats.gif

as you can see my active users is wrong and my percentage too. my total posts and posts today are also wrong.

what have i added wrong and how can i fix this??

Cheers :cheeky:

MuSuL 04-29-2003 12:38 AM

Can this hack give me something like 5 top posters for the month and how many posts they made?

BrokenLinux 05-01-2003 04:17 PM

heh, i just read thru 75 pages and couldn't find this :P

anyways, i want to say this is an awesome hack but i have one question

Is there anyway that only the administrator can view vbstats.php?

cnczone 05-11-2003 11:35 PM

I did the add to index page, but where is a link, what am I suppose to see?

Weasel 05-13-2003 03:39 AM

Why is my active users a negative number?

http://www.almostsmart.com/forums/vbstats.php?s=

monstergamer 05-13-2003 04:22 AM

and why is Activity Level: -37600.00% so high lol

Weasel 05-13-2003 06:15 AM

I went through the code and found that he is trying to do math operations on variables that have been number_formatted, so this error occurs when the number of registered users goes above 1000 and a comma is put into the number to represent the thousands place.

To fix find this:

PHP Code:

    // How Many?
    
$numbersmembers=$DB_site->query_first('SELECT COUNT(*) AS users,MAX(userid) AS max FROM user');
    
$numbermembers=number_format($numbersmembers['users']);

    
// Active/Non?
    
$snonposters=$DB_site->query_first('SELECT COUNT(*) AS users,MAX(userid) AS max FROM user WHERE posts=0');
    
$nonposters=number_format($snonposters['users']);
    
$activemembers=number_format($numbermembers-$nonposters);
 
$activityrate=sprintf("%.2f",(100*$activemembers/$numbermembers));

    
// Newest Member 

and REPLACE with this:

PHP Code:

    // How Many?
    
$numbersmembers=$DB_site->query_first('SELECT COUNT(*) AS users,MAX(userid) AS max FROM user');
    
$numbermembers=$numbersmembers['users'];

    
// Active/Non?
    
$snonposters=$DB_site->query_first('SELECT COUNT(*) AS users,MAX(userid) AS max FROM user WHERE posts=0');
   
$nonposters $snonposters['users'];
    
$activemembers=$numbermembers-$nonposters;
    
$activityrate=sprintf("%.2f",(100*$activemembers/$numbermembers));
    
$numbermembers number_format($numbermembers);
   
$nonposters number_format($nonposters);
   
$activemembers number_format($activemembers);

    
// Newest Member 



All times are GMT. The time now is 05:08 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.01946 seconds
  • Memory Usage 1,754KB
  • 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
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (4)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete