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)
-   -   Members who have registered today (https://vborg.vbsupport.ru/showthread.php?t=72972)

David Bott 02-16-2005 02:20 PM

Thank you once again Paul. Very kind of you.

David Bott 02-17-2005 02:31 PM

Hi Paul:

Well I have tried both $newmembers and $newusers and both give me wrong results. $newusers at this time shows me 8 and in the ADMIN Stats it say 35. If I use $newmembers it shows me a number in the thousands.

Strange.

Paul M 02-17-2005 04:14 PM

The user that shows 8 - what timezone are they in ? (the hack takes into account your TZ settings, afaik, the ACP does not).

$newmembers is not used (as per the original hack) - I don't know why, maybe becasue the number format function screws it up ?

David Bott 02-17-2005 04:24 PM

My personal TimeZone is GMT -5 for New York. Showed 8 new members but after a new name showed up as registering, it still showed 8 which is what made me start to wonder. (I had them reversied before with the counts I mentioned)

If I use $newusers and it shows...83479

If I use $newmembers it shows...8

It is weird for the numbers have not changed from this morning.

I am using your code in post 18.

Code:

// Who Regeistered Today - using Paul Marsden's code
require_once('./includes/functions_misc.php');
$cutoff = vbmktime(0, 0, 0, vbdate('m', $now, false, false), vbdate('d', $now, false, false), vbdate('Y', $now, false, false));
// $cutoff = $now - 86400 ;  // Uncomment this line if you want a rolling last 24 hours.
$newusers = $DB_site->query_first('
SELECT COUNT(*) AS count
FROM ' . TABLE_PREFIX . 'user
WHERE joindate >= ' .$cutoff. '
');
$newmembers = number_format($newusers['count']);
// Who Regeistered Today - using Paul Marsden's code


Paul M 02-17-2005 04:48 PM

Okay - as I said originally - it might work - I have never tested it - I'll try it out in a bit and see whats going on. :)

Edit: Actually, scrap that - I can see what's wrong with it - another line is missing - this is what happens when code is copied from one place to another.

The missing line is
Code:

$now = TIMENOW ;
I have added it to post 18.

David Bott 02-17-2005 04:53 PM

Ok, as I have said before....thanks Paul. ;)

This is how it was done in a VB2 hack...

Code:

$numbersregmembers=$DB_site->query_first("SELECT COUNT(*) AS todayreg FROM user WHERE joindate > " . mktime(0,0,0,date("m"),date("d"),date("Y")) ."");
$numberregmembers=number_format($numbersregmembers['todayreg']);


Paul M 02-17-2005 04:56 PM

Damn - you posted before I finished > see edit above. :)

David Bott 02-17-2005 05:38 PM

Well...Hummm....

Registered Today: 8

Still the same as before. Bummmer and I thought that was it!

Paul M 02-17-2005 06:53 PM

That was it - it works fine here - I have tested it on my system.

David Bott 02-17-2005 08:28 PM

Well it has went up to 9 now. Not sure what it is actually doing the math on. Are we sure it is not per hour? We do over a hundred a day.


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

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.01218 seconds
  • Memory Usage 1,732KB
  • 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
  • (3)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)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