![]() |
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 ## |
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?
|
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" :D
|
Quote:
|
so my code is ok? it doesnt reset at 0:00am
|
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
|
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. |
Oh yeah - I hadn't noticed the require line is missing (for the file that includes the vbmktime() function);
add ; PHP Code:
PHP Code:
|
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? |
Quote:
|
Thank you once again Paul. Very kind of you.
|
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. |
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 ? |
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 |
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 ; |
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")) .""); |
Damn - you posted before I finished > see edit above. :)
|
Well...Hummm....
Registered Today: 8 Still the same as before. Bummmer and I thought that was it! |
That was it - it works fine here - I have tested it on my system.
|
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.
|
Well Paul, I have tried and tried but I can not get this code to work. I just get numbers that look like they reset reach hour or something. (I can not place any logic on what I am seeing.) More or less we get over 100 new members a day and it shows me single digits. I just went to the site today for the first time from 7:00AM and it showed me 1 when in hte AM it was 7. Just weird.
Code:
// Who Regeistered Today - using Paul Marsden's code |
Quote:
|
Hi Paul....Yes, Iam as lost as you are on this one. It just seems it should work, but yet the strange numbers. I am actually surprised this is not in VB already actually as a stat on the main page.
|
I would like to install this hack. Currently I am using vb 3.06 and will upgrade to vb3.07 this weekend. Does this hack work in vb3.07?
|
Installed sucessfully, nice mod. :)
|
Quote:
|
Quote:
|
It wasn't workign for me, I didn't notice you need to ADD A PHRASE.
Secondly the split SQL code between lines wasn't working, I had to change it to this: PHP Code:
|
can you make it so that it lists the new users in the last 24 hours?
|
I have it installed and it seems to be working. The only thing is that the number does not have Registered Today to the left of it Any idea what i did wrong?
Code in the Forum Home: Code:
<div>$vbphrase[reged_today]: $newusers[count], $vbphrase[threads]: $totalthreads, $vbphrase[posts]: $totalposts, $vbphrase[members]: $numbermembers</div> www.localracechat.com |
Quote:
Code:
<div>$vbphrase[reged_today]: PHP Code:
|
Code:
<div>Today's Register : |
hey all... at first this wasn't working for me on vb v3.6.8...
so i had to look up alot of the code changes... and this is what i got for the index.php code... i hope it helps other ppl out... and kudos to ericgtr for the mod.. ;) ** marks as installed ** PHP Code:
|
All times are GMT. The time now is 12:51 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|