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)
-   -   [RELEASE vB2.0] Max Users History (https://vborg.vbsupport.ru/showthread.php?t=11295)

03-13-2001 11:35 PM

cool - is beta 4 gonna have this in it ?

03-14-2001 12:10 AM

where does the max users retrieve the figure from ? and will upgrading to beta 4 etc be okay ?

03-14-2001 12:19 AM

The hack creates a new table with a single entry that is queried when you load index.php. It compared the value in the table with the $totalonline variable, and if $totalonline is larger than the value in the table, the table is updated.

[edit] - the above info is now incorrect - [/edit]

To upgrade your board, you must modify the upgrade script as shown above, and modify the new index.php

03-14-2001 12:34 AM

Quote:

Originally posted by eva2000
cool - is beta 4 gonna have this in it ?
No..

03-14-2001 12:55 AM

sweet mod, thank you.

03-14-2001 01:13 AM

Quote:

Originally posted by Kier
The hack creates a new table with a single entry that is queried when you load index.php. It compared the value in the table with the $totalonline variable, and if $totalonline is larger than the value in the table, the table is updated.

Upgrading to beta 4 will be fine, just modify index.php again after the upgrade.

thanks :D

03-14-2001 01:15 AM

nice, took about 30 seconds to install ! your hacks rule :)

03-14-2001 01:26 AM

Stop downloading this one for a little while.

I've devised a way to do this without an extra query on index.php... give me 20 mins and i'll post the new version.

03-14-2001 01:40 AM

Kier i have been wondering how hard an average would be. Ok i am going to write my thoughts on how to do this as it is a stat i would love.

First, it is only going to work on a site relativly busy, ie with a hit on forumhome every few minutes or so.

So:

i) person hits forumhome (after installing hack).

it records:
i) number of users online
ii) that this is the 1st reporting
iii) the time reported
iv) the average online.

now it needs a couple of times for this to work so lets say we have this:

users: 10, 15, 23, 23, 8
id: 1, 2, 3, 4, 5
minutes (clearly the difference in times): 5, 2, 5, 2 (obviously we can't count the last one)
so to do average we do:

(10x5 + 2x15 + 5x23 + 2x23) / 4

which gives the average.

So any ideas on how this could be done. I would think what you want is a running total that an average can still be generated from but it is too late for me to think of a way to do that.

03-14-2001 01:45 AM

thinking...

say you kept a running count of total minutes and also the average so at any point you can say:

43,343 minutes of statstics with the current average online as 8.4 users.

Now, if you have the next stat of 3 minutes at 20 users then you can do:

((43,343 x 8.4) + (3 x 20) )/ 43,346

and that should give you back the new average and new total, so the process just continues. Make any sense? server intensive? would require two queries me thinks for every loading of forumhome, once to get the stat and second to update it. Wondering if it would perhaps be better to have a cron script run every 5 minutes say that does the updating and then just pull the results (which you might be able to do without another query if you can on your first bit) and that does it?


All times are GMT. The time now is 02:37 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.01156 seconds
  • Memory Usage 1,733KB
  • 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_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (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