Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Total Members (Registrations) Hack Details »»
Total Members (Registrations) Hack
Version: 1.00, by Kaelon Kaelon is offline
Developer Last Online: Jan 2023 Show Printable Version Email this Page

Version: 2.3.x Rating:
Released: 06-16-2003 Last Update: Never Installs: 19
 
No support by the author.

TOTAL MEMBERS (REGISTRATIONS) HACK
Version 1.0 ~ 17 June 2003

This is a really elementary hack, but I was surprised that no one had publicized it for people who know little/nothing about PHP to use. (I did several extensive searches and found no mention of this. If someone else has already posted this, please just let me know and I'll defer appropriately.) This is also the first hack that I've decided to publish on vBulletin.org, even though I'm capable of a bit more complex, but probably because I was fairly certain of what I was doing here.

What does it do?
The Total Members (Registrations) Hack will display the total number of people who have ever registered an account, at one time or another, on your forums, next to your forumhome Members count.

Why is this useful?
If you run a very large forum, with tens of thousands of registrations, but you like keeping your database's users table pruned to reflect only active members (e.g., we regularly prune members who don't post every x days and have less than x number of posts), you can still display the total number of people that have ever registered, at one time or another, on your forums.

What is involved?
1 php file edit (index.php) and 1 template edit (forumhome)

Will this slow down my forumhome?
No. It adds only one calculation and adds only one variable, both of which are expunged by vBulletin after use.

Screenshot posted below. Enjoy!

Regards,
Kaelon
www.Alleria.com

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #22  
Old 06-22-2003, 03:25 PM
Kaelon's Avatar
Kaelon Kaelon is offline
 
Join Date: Jan 2002
Posts: 405
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Xiphoid:

Actually, you need to run the value through the number_format parcer, otherwise, it won't properly display large numbers (> 999).

Cheers,
Kaelon
Reply With Quote
  #23  
Old 06-23-2003, 04:24 PM
Nitesh Nitesh is offline
 
Join Date: Jun 2002
Posts: 34
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thank you xiphoid, works fine. Only problem is that it doesnt display the comma ',' but I can live without that lol
Reply With Quote
  #24  
Old 06-24-2003, 07:36 AM
Floris Floris is offline
 
Join Date: Jan 2002
Posts: 1,898
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Kaelon, it doesn't ?
I am nearing 1000 registrations, so we will find out
Reply With Quote
  #25  
Old 06-24-2003, 12:03 PM
Kaelon's Avatar
Kaelon Kaelon is offline
 
Join Date: Jan 2002
Posts: 405
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Today at 04:36 AM xiphoid said this in Post #23
Kaelon, it doesn't ?
I am nearing 1000 registrations, so we will find out
Hi, Xiphoid,

Nope - you need to run it through the number_format parser in order to have it properly add commas for text display of the userid value, otherwise, it'll simply show up as a numerical string completely different from your other value strings.

On a totally different note, I just wanted to let you know that I visited your forum and it looks like vB3 handles user visits differently; I was visiting it and it said that there were 0 members and 0 guests online; I had to refresh a couple of times before the system actually picked me up. I'm guessing deferred guestvisits, a la Jujubee's system?

Kaelon
Reply With Quote
  #26  
Old 06-29-2003, 04:44 PM
Flogger Flogger is offline
 
Join Date: Jun 2003
Posts: 3
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

great hack
Reply With Quote
  #27  
Old 06-29-2003, 06:38 PM
snakes1100 snakes1100 is offline
 
Join Date: Dec 2001
Location: Michigan
Posts: 3,733
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Well, for our board it is a nice hack, a big thank you also.

Server load didn't rise either that i can see.
Reply With Quote
  #28  
Old 06-30-2003, 02:39 PM
Kaelon's Avatar
Kaelon Kaelon is offline
 
Join Date: Jan 2002
Posts: 405
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Glad that it works well for you! Since there are no added queries, you'll find that there's no shift in performance.

Kaelon
Reply With Quote
  #29  
Old 07-19-2003, 09:33 PM
Ludelover Ludelover is offline
 
Join Date: Jan 2003
Location: Redwood City
Posts: 16
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

How would you do the total posts & total threads for the message board? If you were to update the counters would that make this not work?
Reply With Quote
  #30  
Old 07-22-2003, 01:48 PM
wez wez is offline
 
Join Date: Jul 2003
Posts: 15
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

very good 10/10
Reply With Quote
  #31  
Old 07-28-2003, 10:45 PM
Kaelon's Avatar
Kaelon Kaelon is offline
 
Join Date: Jan 2002
Posts: 405
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
How would you do the total posts & total threads for the message board? If you were to update the counters would that make this not work?
Total Posts & Total Threads for the message board are already included, but admittedly, you point out a good situation - it only shows the current total posts and current total threads that still exist on the forum (active). Regrettably, you'd have to add two more queries to forumhome to get the latestthreadid and latestpostid - and that makes for a not-so-great hack.

That being said, others have done this before ("Thread Statistics Hacks on Forumhome"), but I advise against using those hacks because only Total Users has already been queried in the stock vBulletin install (when it shows you the newest member); you'd have to do two more unique queries for latest thread and latest post. Not advisable.

Glad that everyone enjoys this relatively easy/simple hack.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 07:52 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04814 seconds
  • Memory Usage 2,308KB
  • Queries Executed 27 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete