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)

Bane 01-16-2002 12:51 AM

A link to the instructions for installing on 2.2.1 can be found HERE and a link has been added to the small FAQ in the second post of this thread.

Not that anyone reads it :p

Lucky 01-17-2002 02:06 AM

Wicked work buddy!

Thank you :)

Jawelin 01-17-2002 01:32 PM

Hi Bane.

Great job! I finally installed it reading all this +570 posts thread !!! :stupid:

Everything works on my 2.2.1, even the optional features like online.php and admin/index.php.

But.... ;)


... when I tried to install the forumhome addon, as shown in
Post #342, I got only the usual forum homepage instead of one with all suggested statistics added...

I carefully created the vbstats_forumhome template and added the lines to index.php (on forum base dir)... even the FireFly's correction " $tltoday=time()-(86400); "....

All those vars seem to be calculated (I didn't got any php parse error), but I can't see anything of vbstat..... template on my forumhome.

What else could I check if forgot ?


P.S.: what's the sintax of "Date Statistics Begin", defaulted to '952001' ?

Thanks a lot.

Bye

Bane 01-17-2002 02:00 PM

Did you add the var to forumhome?

Date started is pretty useless.. just a date.. it only displays in the link list.. only worry about it if you want to.. I just put the date I started tracking with vbStats

Jawelin 01-17-2002 02:42 PM

:noid:

Just analyzing the index.php code I found the line:
PHP Code:

  eval("\$vbstats = \"".gettemplate('vbstats_forumhome')."\";"); 

so I guessed the 'external' name of this 'bit' was actually $vbstats and not $vbstats_forumhome as I tried to insert before into forumhome template... :kiss:

Thanks.

Hwr, some number on that first page didn't match... Infact I had activeusers as a negative number, and the rate absolutely inconsistant.
The part in index.php
PHP Code:

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

should be replaced with
PHP Code:

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

That's because the $numbermembers variable is not a number but a string (comes from a format for thousands separator)...
My version used the original value coming from SELECT....

Hope this could be useful to the advanced options...

Thanks a lot for such a fast answer.


P.S.: the starting date. I didn't found anywhere on vbstats.php pages... :?:

Thanks again.
Bye

Smallville 01-18-2002 11:44 AM

In my admin CP when I click View Public Stats or whatever, I get this.
Quote:

Warning: Division by zero in /home/thechar/public_html/vbstats.php on line 159

Warning: Division by zero in /home/thechar/public_html/vbstats.php on line 165

Warning: Division by zero in /home/thechar/public_html/vbstats.php on line 162

Warning: Division by zero in /home/thechar/public_html/vbstats.php on line 186

Warning: Division by zero in /home/thechar/public_html/vbstats.php on line 148

Warning: Division by zero in /home/thechar/public_html/vbstats.php on line 139

Warning: Division by zero in /home/thechar/public_html/vbstats.php on line 145

Warning: Division by zero in /home/thechar/public_html/vbstats.php on line 142

Warning: Division by zero in /home/thechar/public_html/vbstats.php on line 136

Warning: Division by zero in /home/thechar/public_html/vbstats.php on line 151

Warning: Division by zero in /home/thechar/public_html/vbstats.php on line 154
What should I do? It's in one of the files that came from the zip, so I don't think I did something wrong. PLEASE HELP. This is a ver cool hackl.

Bane 01-18-2002 12:15 PM

Smallville: Please take another look through the directions. Or at the second post of this thread. Or at any one of the 150 people who posted that same error. :( You didn't include the counter in the PHP include. For directions read the directions or the second post of the vbstats thread.

Jawelin 01-18-2002 03:55 PM

And me :kiss: just comin' before Smallville's question ?
;)

Bane 01-18-2002 04:44 PM

I will look at that when I update. Not having a problem on my board, but you never know. I have to adjust the activity level setting anyway.. by default it should be a percentage.

The starting date is something you can include.. IE if you want {900093093 Hits since $startdate} on your page. :D

Smallville 01-18-2002 07:17 PM

Figured out my problem.

I added what you said in the FAQ in the second post here, but what you gave is wrong.

The FAQ says to add
PHP Code:

include("./counter.php"); 

in the phpinclude template, but it's actually
PHP Code:

include("vbs_counter.php"); 

I found this on page 6 or something. Doesn't matter, but you should probably change the FAQ, because I did what you said there from the start and it was wrong. That's why I posted here. I do look at every post, but with 39 pages, I decided for THIS TIME to skip them. Sorry to annoy you.


All times are GMT. The time now is 05:55 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.02171 seconds
  • Memory Usage 1,755KB
  • 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
  • (5)bbcode_php_printable
  • (1)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