Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 12-25-2003, 02:50 PM
jthorpe jthorpe is offline
 
Join Date: Jun 2002
Posts: 27
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default # of posts for the day on non-vb page?

Hi guys, pretty new here and just installed vb 2.3.3 recently. Works great so far, and added vbhome lite for the front page. I really like it, but I'm wondering if there is a way to show how many posts have accumulated for the current day on there as well? It shows the total number of posts on the front page, but my users are always interested in seeing how many posts per day occur. I searched but maybe not well enough. I couldn't find anything that does this. Any help would be appreciated. Thanks

Jack

http://www.dieseltruckresource.com
Reply With Quote
  #2  
Old 12-26-2003, 06:55 AM
BlackxRam BlackxRam is offline
 
Join Date: Aug 2003
Posts: 364
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Try my hack its called the Ultimate Stats to non VB page hack. you can search it pretty easily. People in that thread have it working for 2.3.3

Just be sure to follow the instructions for member of the day. That might need to be removed.
Reply With Quote
  #3  
Old 12-26-2003, 03:09 PM
jthorpe jthorpe is offline
 
Join Date: Jun 2002
Posts: 27
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by BlackxRam
Try my hack its called the Ultimate Stats to non VB page hack. you can search it pretty easily. People in that thread have it working for 2.3.3

Just be sure to follow the instructions for member of the day. That might need to be removed.
Thanks for the info. I'll check it again, but I messed with that hack yesterday and only saw where it shows total posts on the forum, not the posts on the current day. All I'm looking for is the amount of posts on the current day to stick on the front page of my site.
Reply With Quote
  #4  
Old 12-27-2003, 09:28 AM
BlackxRam BlackxRam is offline
 
Join Date: Aug 2003
Posts: 364
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

the code you can use is this

Code:
// Today
$vbs_today=time()-(86400);
$gettodaystats = $DB_site->query_first("SELECT count(postid) AS posts, COUNT(DISTINCT(threadid)) AS threads FROM post WHERE dateline>='$vbs_today'"); 
$poststoday = number_format($gettodaystats['posts']); 
$threadstoday = number_format($gettodaystats['threads']);
$getviewstoday=$DB_site->query_first("SELECT SUM(views) AS threadviews FROM thread WHERE dateline>='$vbs_today'");
$viewstoday=number_format($getviewstoday['threadviews']);
Just plug that under

Code:
// get total posts
$countposts=$DB_site->query_first('SELECT COUNT(*) AS posts FROM post');
$totalposts=number_format($countposts['posts']);

$countthreads=$DB_site->query_first('SELECT COUNT(*) AS threads FROM thread');
$totalthreads=number_format($countthreads['threads']);
in that boardstats.php file of mine. Then just use the $ statements to call your stats in the boardstat.php file. That entire file is customizable. ANy addon you put in your INDEX.php file of your forums can be put into that boardstat.php file.

Have Fun
Reply With Quote
  #5  
Old 12-28-2003, 12:23 PM
jthorpe jthorpe is offline
 
Join Date: Jun 2002
Posts: 27
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Does that not pull posts for the past 24 hours, and not actually the current day from midnight?
Reply With Quote
  #6  
Old 12-28-2003, 06:04 PM
jthorpe jthorpe is offline
 
Join Date: Jun 2002
Posts: 27
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok, figured it out. Instead of showing the last 24 hrs, I wanted to show the posts of that current day since midnight so instead of using time()-(86400), I used mktime(0,0,0); and that worked fine. Thanks for the info. Everything together made it exactly how I needed it. Thanks again.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 01:25 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.06170 seconds
  • Memory Usage 2,207KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (2)bbcode_code
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (6)post_thanks_box
  • (6)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (6)post_thanks_postbit_info
  • (6)postbit
  • (6)postbit_onlinestatus
  • (6)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete