The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Members who have registered today Details »» | |||||||||||||||||||||||||
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:
PHP Code:
Code:
<div>$vbphrase[threads]: $totalthreads, $vbphrase[posts]: $totalposts, $vbphrase[members]: $numbermembers</div> Code:
<div>$vbphrase[reged_today]: $newusers[count], $vbphrase[threads]: $totalthreads, $vbphrase[posts]: $totalposts, $vbphrase[members]: $numbermembers</div> That's it, I am supporting this please click install if you find it useful Supporters / CoAuthors Show Your Support
|
Comments |
#52
|
|||
|
|||
Thank you once again Paul. Very kind of you.
|
#53
|
|||
|
|||
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. |
#54
|
||||
|
||||
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 ? |
#55
|
|||
|
|||
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 |
#56
|
||||
|
||||
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 ; |
#57
|
|||
|
|||
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']); |
#58
|
||||
|
||||
Damn - you posted before I finished > see edit above.
|
#59
|
|||
|
|||
Well...Hummm....
Registered Today: 8 Still the same as before. Bummmer and I thought that was it! |
#60
|
||||
|
||||
That was it - it works fine here - I have tested it on my system.
|
#61
|
|||
|
|||
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.
|
Thread Tools | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|