vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   Number of new members statistic on forum home (https://vborg.vbsupport.ru/showthread.php?t=69392)

Spinball 09-12-2004 10:00 PM

Number of new members statistic on forum home
 
I wanted to show potential advertisers as well as potential forum members how many people are registering to use our forums every day.
So I wrote this hack to display a 30 day average in the stats box of the forum home. It counts the number of people in user group 2 - registered members, ignoring those people who haven't activated their accounts, yet.
It's very easy, takes just a few minutes and requires 1 additional query.
You can see it working at www.avforums.com.
Please click Install if you use it.
Thanks to Bryan Ex for doing a bit of bug fixing help :)

Bryan Ex 09-13-2004 02:58 PM

Great idea... well, at least for active forums. LOL Adding it in today - thanks!

Bryan Ex 09-13-2004 03:08 PM

Something you will likely get asked about is a query to update the stats after a new install. I can see many not wanting to display 0.00 to start out with.

Spinball 09-13-2004 03:49 PM

I doubt anyone having done a new install will want to have this hack working for a wee while. Anyway all they'll have to do is revert back to the original FORUMHOME template. Glad you think it's useful.

Bryan Ex 09-13-2004 03:58 PM

LOL... yeah, that I agree with but what I meant was even for an established board the stats start out at 0 and I would presume it will take a month for them to be accurate (each day that passes getting a little closer). I've done exactly what you've suggested and left it installed but commented out the forum display until later this month when it looks a little better. I'll just have to remember to uncomment next month. Nice hack though and it will be very helpful to me.

M1th 09-13-2004 03:59 PM

You could use the round() function to get a whole number out of the average. :)

Spinball 09-13-2004 04:21 PM

Quote:

Originally Posted by M1th
You could use the round() function to get a whole number out of the average. :)

Just change the new line in the index.php script from

PHP Code:

$averageregistrations vb_number_format($userstats['averageregistrations'],2); 

to
PHP Code:

$averageregistrations vb_number_format($userstats['averageregistrations']); 

i.e. remove the ',2'. I deliberately wanted to specify a couple of decimal places. Makes the stats look more scientific :)

Polo 09-13-2004 05:58 PM

Nice Hack, I like it :)

Johnny 09-13-2004 08:00 PM

i dont understand how this mod works spinball...

i looked on ur site and it says:
New registrations per day (30 day average): 66.20

whats the decimal part for? i thought each new register counts as one and not as a decimal

Bryan Ex 09-13-2004 08:03 PM

It's averaged over a 30 day period... in this case 1986 new joins in 30 days (1986 / 30).


All times are GMT. The time now is 04:42 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.00998 seconds
  • Memory Usage 1,738KB
  • 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
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)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