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

Reply
 
Thread Tools
vBa CMPS: users registered today Details »»
vBa CMPS: users 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-13-2004 Last Update: Never Installs: 27
 
No support by the author.

This will add a "Registered Today" (actually in the last 24 hours) to your Stats box.

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

In the adv_portal_stats template:

Find:
Code:
$vbphrase[top_poster]: <a href="$vboptions[bburl]/member.php?$session[sessionurl]u=$topposter[userid]">$topposter[username]</a> ($topposter[posts])<br />
Below add:
Code:
$vbphrase[reged_today]: ($newusers[count])<br />
Open modules/stats.php

Find:
Code:
$newuserid = $userstats['newuserid'];
Add below:
Code:
$newusers = $DB_site->query_first('
SELECT COUNT(*) AS count 
    FROM ' . TABLE_PREFIX . 'user
    WHERE joindate >= "' . strtotime("-1day") . '"
');
$newmembers = number_format($newusers['count']);
Thanks a lot to KW802 for help with the query.

Supporters / CoAuthors

Show Your Support

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

Comments
  #42  
Old 04-08-2005, 06:17 PM
Flow Fusion Flow Fusion is offline
 
Join Date: Jul 2003
Location: Georgia
Posts: 512
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

installed
Reply With Quote
  #43  
Old 04-10-2005, 12:04 PM
redcow redcow is offline
 
Join Date: Apr 2005
Posts: 3
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thanks
Reply With Quote
  #44  
Old 07-13-2005, 07:55 AM
c0d3x c0d3x is offline
 
Join Date: Mar 2005
Posts: 38
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i noticed that this hack will count only users that registered in the past 24hours, but i wanted to show the users registered when the new day starts, so from 0:00 (midnight)

it's simple to do that, just copy&paste a bit of code from the index.php of the admincp

here the instructions:

open up your ./modules/stats.php and find:
Code:
$DB_site->free_result($getforumstats);
unset($forum)
below past this:
Code:
$starttime = mktime(0, 0, 0, date('m'), date('d'), date('Y'));
find
Code:
$newusers = $DB_site->query_first('
SELECT COUNT(*) AS count 
    FROM ' . TABLE_PREFIX . 'user
    WHERE joindate >= "' . strtotime("-1day") . '"
');
$newmembers = number_format($newusers['count']);
change it with this:
Code:
$newusers = $DB_site->query_first("SELECT COUNT(*) AS count FROM " . TABLE_PREFIX . "user WHERE joindate >= $starttime");
$newmembers = number_format($newusers['count']);
in the adv_portal_stats template change:
Code:
$vbphrase[reged_today]: ($newusers[count])<br />
with:
Code:
$vbphrase[reged_today]: $newusers[count] <if condition="$newusers[count]==1"> user<else /> users</if> <br />

this is my first attempt to do a vb hack, i hope you liked it

ps: sorry for my english :P
Reply With Quote
  #45  
Old 07-13-2005, 10:51 PM
Mokster Mokster is offline
 
Join Date: Sep 2004
Location: Toronto
Posts: 39
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

nice, how about actually displaying the names of the users that registered instead of just a numerical count...
Reply With Quote
  #46  
Old 07-21-2005, 02:22 PM
deb0 deb0 is offline
 
Join Date: Sep 2004
Location: somewhere
Posts: 183
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

quick, easy! Excellent!
Reply With Quote
  #47  
Old 07-21-2005, 09:23 PM
deb0 deb0 is offline
 
Join Date: Sep 2004
Location: somewhere
Posts: 183
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Actually, mine isn't working right, it's counting backwards. i double checked it. i'm running 307.

No support, Doesn't work correctly=Uninstall.

thx anyway!
Reply With Quote
  #48  
Old 08-09-2005, 01:50 AM
Extreme John Extreme John is offline
 
Join Date: Nov 2004
Posts: 74
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

great hack took about 2 seconds to install
Reply With Quote
  #49  
Old 08-10-2005, 05:37 AM
csidlernet csidlernet is offline
 
Join Date: Apr 2003
Location: sydney
Posts: 183
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

sweet thanks
Reply With Quote
  #50  
Old 09-23-2005, 04:54 PM
Clayton Clayton is offline
 
Join Date: Nov 2004
Posts: 216
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

And that infamous question still nags

nice, how about actually displaying the names of the users that registered instead of just a numerical count...

and news on this yet, please?

Thank You

C
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 05:08 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.04540 seconds
  • Memory Usage 2,294KB
  • Queries Executed 25 (?)
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
  • (10)bbcode_code
  • (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
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (10)postbit_onlinestatus
  • (10)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