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-18-2005 09:05 PM

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
$now = TIMENOW ;
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

Thank you for trying...But I am lost with it.

Paul M 02-18-2005 09:18 PM

Quote:

Originally Posted by David Bott
Thank you for trying...But I am lost with it.

I cannot really do anymore without access to the site, I could then load up a test page and see what's going on.

David Bott 02-19-2005 01:22 PM

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.

lefthome 03-09-2005 11:03 AM

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?

ecfcgraham 03-24-2005 10:03 AM

Installed sucessfully, nice mod. :)

ericgtr 03-24-2005 04:32 PM

Quote:

Originally Posted by lefthome
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?

I don't see why it wouldn't but haven't tested it yet. It's pretty easy to yank if it doesn't though :)

KanyeWest 03-24-2005 05:43 PM

Quote:

Originally Posted by lefthome
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?

Yes it works in 3.0.7 why wouldnt it?

ramprage 04-06-2005 05:32 PM

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:

// ### 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 ## 

Now its working fine on 3.07 :D

Mokster 04-07-2005 12:13 AM

can you make it so that it lists the new users in the last 24 hours?

RaceJunkie 09-24-2005 04:50 AM

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


All times are GMT. The time now is 03:23 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.01242 seconds
  • Memory Usage 1,740KB
  • 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
  • (2)bbcode_code_printable
  • (1)bbcode_php_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)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