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)

MajorFm.com 01-29-2005 01:40 PM

Thats what we are tryin to do now, the original hack does the last 24 hours, we are tryin to make it so it counts from midnight.

Boofo 01-29-2005 01:50 PM

Paul's code in post 18 will do that. ;)

ericgtr 01-29-2005 01:51 PM

Yep, you are right Boofoo it works. Thanks Paul! :) and sorry for posting the wrong query up there guys I have to learn to label my code better in my index.php.

MajorFm.com 01-29-2005 02:03 PM

ok it works for you guys, im gettin a blank spot for some reason... i assume this will work when my forum passes midnight maybe..

ericgtr 01-29-2005 02:11 PM

You should still get a value of zero, I just registered and it still doesn't show. Try pasting it Paul's code above exactly if you haven't already I just tested on my site and it works.

MajorFm.com 01-29-2005 02:31 PM

i pasted that exactly replacing your original code... strange...

The segment in my index.php looks like this

Code:

        {
                $getstats_thread[isdeleted] = true;
        }
        eval('$stats_threads .= "' . fetch_template('forumhome_stats_thread') . '";');
}
// Who Regeistered Today - using Paul Marsden's code
$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.
$whousers = $DB_site->query_first('
SELECT COUNT(*) AS count
FROM ' . TABLE_PREFIX . 'user
WHERE joindate >= " .$cutoff. "
');
$newmembers = number_format($whousers['count']);
// Who Regeistered Today - using Paul Marsden's code
// ### ALL DONE! SPIT OUT THE HTML AND LET'S GET OUTA HERE... ###
eval('$vbpopup = "' . fetch_template('forumhome_vbpopup') . '";');
eval('$navbar = "' . fetch_template('navbar') . '";');
eval('print_output("' . fetch_template('FORUMHOME') . '");');


MajorFm.com 01-29-2005 08:05 PM

Any idea? i still get a blank spot..

Paul M 01-29-2005 08:29 PM

Quote:

Originally Posted by MajorFm.com
Any idea? i still get a blank spot..

Yeah, actually, it might be a small error in what I posted above - I notice a couple of of the quotation marks are doubles, when they ought to be singles (it was done in a hurry ;));

The two to change are hilighted below (on the WHERE line) ;


Code:

        {
                $getstats_thread[isdeleted] = true;
        }
        eval('$stats_threads .= "' . fetch_template('forumhome_stats_thread') . '";');
}
// 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.
$whousers = $DB_site->query_first('
SELECT COUNT(*) AS count
FROM ' . TABLE_PREFIX . 'user
WHERE joindate >= " .$cutoff. "
');
$newmembers = number_format($whousers['count']);
// Who Regeistered Today - using Paul Marsden's code
// ### ALL DONE! SPIT OUT THE HTML AND LET'S GET OUTA HERE... ###
eval('$vbpopup = "' . fetch_template('forumhome_vbpopup') . '";');
eval('$navbar = "' . fetch_template('navbar') . '";');
eval('print_output("' . fetch_template('FORUMHOME') . '");');

Change them both to single quote marks ;

Code:

WHERE joindate >= ' .$cutoff. '
:)

MajorFm.com 01-29-2005 08:35 PM

I did this, still a blank... :-(

Paul M 01-29-2005 08:58 PM

Hmm, I'm not sure how I've ended up supporting someone elses hack ;) - but yes, I can see the problem.

In the code I posted, change

PHP Code:

$whousers $DB_site->query_first(

to

PHP Code:

$newusers $DB_site->query_first(

and it should work.

The reason is that the line changed in the FORUMHOME template is using the array value, not the subsequently created $newmembers variable;

Code:

<div>$vbphrase[reged_today]: $newusers[count], $vbphrase[threads]: $totalthreads, $vbphrase[posts]: $totalposts, $vbphrase[members]: $numbermembers</div>
This would appear to be an oversight by the hack author. :)


All times are GMT. The time now is 01:12 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.01171 seconds
  • Memory Usage 1,745KB
  • 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
  • (4)bbcode_code_printable
  • (2)bbcode_php_printable
  • (1)bbcode_quote_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