Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Full Releases

Reply
 
Thread Tools
Members who have registered today Details »»
Members who have registered today
Version: 1.00, by ericgtr ericgtr is offline
Developer Last Online: Feb 2022 Show Printable Version Email this Page

Version: 3.0.3 Rating:
Released: 12-15-2004 Last Update: Never Installs: 26
 
No support by the author.

I was going to add this to my existing vbindex stats mod but it's a little too different so I will post it up as a new one, this has been requested a few times in the short time I have been here.

Update, corrected: Originally had forumindex.php when it should be index.php

What it does:
Adds a Registered Today (how many users in the last 24 hours) to the statistics on the forum index.

Modifications:
1 Template
1 File
1 Phrase

Add a phrase:
Global
Varname: reged_today
Text: Registered Today

In index.php find:

PHP Code:
// ### ALL DONE! SPIT OUT THE HTML AND LET'S GET OUTA HERE... ### 
Above it add:

PHP Code:
// ### Registered Today ##
$newusers $DB_site->query_first('
SELECT COUNT(*) AS count 
FROM ' 
TABLE_PREFIX 'user
WHERE joindate >= "' 
strtotime("-1day") . '"
'
);
$newmembers number_format($newusers['count']);
// ### Registered Today ## 
In your FORUMHOME template find:

Code:
			<div>$vbphrase[threads]: $totalthreads, $vbphrase[posts]: $totalposts, $vbphrase[members]: $numbermembers</div>
Change it to (or maker the proper addition as shown):

Code:
			<div>$vbphrase[reged_today]: $newusers[count], $vbphrase[threads]: $totalthreads, $vbphrase[posts]: $totalposts, $vbphrase[members]: $numbermembers</div>
Update: Paul M has worked this out to start at midnight, instead of just the last 24 hrs here https://vborg.vbsupport.ru/showpost....5&postcount=18


That's it, I am supporting this please click install if you find it useful

Supporters / CoAuthors

Show Your Support

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

Comments
  #42  
Old 02-09-2005, 12:52 PM
Thug Thug is offline
 
Join Date: Feb 2004
Location: Sheffield : uk
Posts: 783
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

this is the code i used
is it right

// ### Registered Today ##
$newusers = $DB_site->query_first('
SELECT COUNT(*) AS count
FROM ' . TABLE_PREFIX . 'user
WHERE joindate >= "' . strtotime("-1day") . '"
');
$newmembers = number_format($newusers['count']);
// ### Registered Today ##
Reply With Quote
  #43  
Old 02-09-2005, 01:05 PM
ericgtr's Avatar
ericgtr ericgtr is offline
 
Join Date: Apr 2003
Location: Portland, Oregon
Posts: 1,407
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

That's right, looks exactly like what I posted. If you use that and the other instructions I mentioned it should work. What exactly isn't working for you?
Reply With Quote
  #44  
Old 02-09-2005, 01:45 PM
yoyoyoyo's Avatar
yoyoyoyo yoyoyoyo is offline
 
Join Date: Dec 2004
Location: USA
Posts: 1,612
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

is there anyway to make the phrase in the forum home stats only show up if there are registrations? If there is a day with no registrations it would be nice to not have it say anything instead of "Registered today: 0"
Reply With Quote
  #45  
Old 02-09-2005, 02:26 PM
ericgtr's Avatar
ericgtr ericgtr is offline
 
Join Date: Apr 2003
Location: Portland, Oregon
Posts: 1,407
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by yoyoyoyo
is there anyway to make the phrase in the forum home stats only show up if there are registrations? If there is a day with no registrations it would be nice to not have it say anything instead of "Registered today: 0"
From what I can gather at first glance, I would have to completely rework the code for that and would take more time to learn how than I have right now.
Reply With Quote
  #46  
Old 02-10-2005, 12:33 PM
Thug Thug is offline
 
Join Date: Feb 2004
Location: Sheffield : uk
Posts: 783
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

so my code is ok? it doesnt reset at 0:00am
Reply With Quote
  #47  
Old 02-10-2005, 12:36 PM
eva01_'s Avatar
eva01_ eva01_ is offline
 
Join Date: Aug 2004
Location: Plymouth
Posts: 255
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i believe it resets 24hrs after you installed it and that is the zero hour. at least thats my thought, or it is based off the creators timezone
Reply With Quote
  #48  
Old 02-16-2005, 11:03 AM
David Bott David Bott is offline
 
Join Date: Dec 2001
Posts: 215
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Not sure...but using Pauls M. revision produces...

Fatal error: Call to undefined function: vbmktime() in /home/avsforum/www.tivocommunity.com/tivo-vb/index.php on line 436

For me.
Reply With Quote
  #49  
Old 02-16-2005, 11:13 AM
Paul M's Avatar
Paul M Paul M is offline
 
Join Date: Sep 2004
Location: Nottingham, UK
Posts: 23,748
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Oh yeah - I hadn't noticed the require line is missing (for the file that includes the vbmktime() function);

add ;

PHP Code:
require_once('./includes/functions_misc.php'); 
above ;

PHP Code:
$cutoff vbmktime(000vbdate('m'$nowfalsefalse), vbdate('d'$now
Original post updated.
Reply With Quote
  #50  
Old 02-16-2005, 11:48 AM
David Bott David Bott is offline
 
Join Date: Dec 2001
Posts: 215
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

LOL...Hi Paul! Boy, two helps from you in a day! Thank you for the support!

BTW...You also mention something about replacing "$whousers" in one line. So you know, or maybe you do, it is used in TWO places.

Can we please get a complete update to your fine code on in one post?
Reply With Quote
  #51  
Old 02-16-2005, 02:16 PM
Paul M's Avatar
Paul M Paul M is offline
 
Join Date: Sep 2004
Location: Nottingham, UK
Posts: 23,748
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by David Bott
LOL...Hi Paul! Boy, two helps from you in a day! Thank you for the support!


BTW...You also mention something about replacing "$whousers" in one line. So you know, or maybe you do, it is used in TWO places.

Can we please get a complete update to your fine code on in one post?
I've checked the code in Post 18 and all the little bug fixes should now be in it - If you are using this version I suggest you replace your existing code with what's now in this post.
Reply With Quote
Reply

Thread Tools

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 03:46 PM.


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.04899 seconds
  • Memory Usage 2,312KB
  • Queries Executed 26 (?)
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_code
  • (4)bbcode_php
  • (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
  • (4)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_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