vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   show weekly and monthly new member totals (https://vborg.vbsupport.ru/showthread.php?t=42992)

Odil 08-31-2002 01:31 PM

show weekly and monthly new member totals
 
How would I show the weekly and monthly new member totals on my stats page? I have already figured out how to show them daily but not weekly or monthly.

I would appreciate any help!!

Thanks,

Odil

Odil 08-31-2002 09:34 PM

Someone has to know...

Odil

Logician 09-01-2002 10:32 AM

PHP Code:

$weekly =  mktime (date("H"), date("i"), date("s"), date("m"), date("d")-7date("Y"));
$monthly =  mktime (date("H"), date("i"), date("s"), date("m")-1date("d"), date("Y"));
$new_userW=$DB_site->query_first("SELECT count(*) as count FROM user WHERE joindate>$weekly");
$weeklyuser=$new_userW['count'];
$new_userM=$DB_site->query_first("SELECT count(*) as count FROM user WHERE joindate>$monthly");
$monthlyuser=$new_userM['count']; 

Now use variables $monthlyuser and $weeklyuser in the relevant template or your code..

Odil 09-01-2002 10:38 AM

Quote:

Originally posted by Logician
PHP Code:

$weekly =  mktime (date("H"), date("i"), date("s"), date("m"), date("d")-7date("Y"));
$monthly =  mktime (date("H"), date("i"), date("s"), date("m")-1date("d"), date("Y"));
$new_userW=$DB_site->query_first("SELECT count(*) as count FROM user WHERE joindate>$weekly");
$weeklyuser=$new_userW['count'];
$new_userM=$DB_site->query_first("SELECT count(*) as count FROM user WHERE joindate>$monthly");
$monthlyuser=$new_userM['count']; 

Now use variables $monthlyuser and $weeklyuser in the relevant template or your code..

Excellent thank you! I was looking at the stats.php in the admin directory to see if I could figure the code out but I'm not that good at it yet. Thanks again!

Odil

DudeSicko 09-04-2002 09:38 AM

Where exactley do you put this in ?

Wich file ?

Logician 09-04-2002 09:48 AM

Quote:

Where exactley do you put this in ?
depends..

He was trying to integrate it to his existing stats file, so he put it there.

If you want to make it displayed in say main forum page, then you would put in index.php... For forums page it's forumdisplay.php..

Buttom line: it depends..

Link14716 09-04-2002 11:55 AM

Or, if you don't know where to put it, go to your admin CP, stats, and then......
Start --> Programs --> Accessories --> Calculator

:D

DudeSicko 09-04-2002 01:01 PM

Thx il try this out.


All times are GMT. The time now is 12:39 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.01007 seconds
  • Memory Usage 1,738KB
  • 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_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (8)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete