Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Full Releases

Reply
 
Thread Tools
Today's Posts on forumhome (number). Details »»
Today's Posts on forumhome (number).
Version: 1.0.0, by Deaths Deaths is offline
Developer Last Online: Mar 2009 Show Printable Version Email this Page

Version: 3.0.7 Rating:
Released: 04-05-2005 Last Update: 04-05-2005 Installs: 32
 
No support by the author.

A couple of my members requested this hack, so I created it, and decided to share it with you guys .

What does this hack do?
This hack will display the number of posts made today.

Misc Info:
The "today" text linksto search.php?do=getdaily, for your lazy members
Creator: Deaths
Support is given in Hack's Thread, or preferably at vBadditions.com (when its back up).
Live Demo: http://board.xgnews.org/?styleid=1

The attached .zip contains an install file, for those who would like a copy.

Here we go:

Open up /index.php, and find:
PHP Code:
$userstats unserialize($datastore['userstats']);
$numbermembers vb_number_format($userstats['numbermembers']);
$newusername $userstats['newusername'];
$newuserid $userstats['newuserid']; 
Bellow, add:

PHP Code:
// START POSTS TODAY ON FORUMHOME HACK
$starttime mktime(000date('m'), date('d'), date('Y'));
$newposts $DB_site->query_first("SELECT COUNT(*) AS count FROM " TABLE_PREFIX "post WHERE dateline >= $starttime");
$poststoday vb_number_format($newposts['count']);
// END POSTS TODAY ON FORUMHOME HACK 
Save, Close & Upload.

Now, open up the TEMPLATE FORUMHOME.

Find:
HTML Code:
$vbphrase[posts]: $totalposts
REPLACE with:
HTML Code:
$vbphrase[posts] (<a href="search.php?do=getdaily">$vbphrase[today]</a>): $totalposts ($poststoday) 
That's it, you're done!

If you use this hack, please click INSTALL!

Supporters / CoAuthors

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #42  
Old 04-28-2005, 06:43 PM
Deaths Deaths is offline
 
Join Date: Oct 2004
Location: Europe, Belgium
Posts: 679
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hehe, no problem .

Tell me when its open to all, and Ill join
Reply With Quote
  #43  
Old 04-28-2005, 07:51 PM
Allan's Avatar
Allan Allan is offline
 
Join Date: Jun 2003
Location: France
Posts: 1,513
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thanks, click install
Reply With Quote
  #44  
Old 05-05-2005, 01:45 PM
iceytdot iceytdot is offline
 
Join Date: Apr 2004
Posts: 58
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thanks installed! is there a hack that shows Threads today? might as well kill 2 birds with 1 stone lol
Reply With Quote
  #45  
Old 05-05-2005, 02:11 PM
Deaths Deaths is offline
 
Join Date: Oct 2004
Location: Europe, Belgium
Posts: 679
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Be warned, this will add an extra query to index.php!

Replace
PHP Code:
// START POSTS TODAY ON FORUMHOME HACK
$starttime mktime(000date('m'), date('d'), date('Y'));
$newposts $DB_site->query_first("SELECT COUNT(*) AS count FROM " TABLE_PREFIX "post WHERE dateline >= $starttime");
$poststoday vb_number_format($newposts['count']);
// END POSTS TODAY ON FORUMHOME HACK 
With

PHP Code:
// START POSTS TODAY ON FORUMHOME HACK
$starttime mktime(000date('m'), date('d'), date('Y'));
$newposts $DB_site->query_first("SELECT COUNT(*) AS count FROM " TABLE_PREFIX "post WHERE dateline >= $starttime");
$countthreadstoday $DB_site->query_first("SELECT COUNT(*) AS count FROM " TABLE_PREFIX "thread WHERE dateline >= $starttime");
$threadstoday vb_number_format($countthreadstoday['count']);
$poststoday vb_number_format($newposts['count']);
// END POSTS TODAY ON FORUMHOME HACK 
Untested, but should work.
Reply With Quote
  #46  
Old 05-07-2005, 12:17 PM
got1-2 got1-2 is offline
 
Join Date: Mar 2005
Location: here
Posts: 22
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

very easy..thanks! I just changed the order a little so it reads like this


[
PHP Code:
<div>$vbphrase[threads]:=$totalthreads$vbphrase[posts] = $totalposts: (<a href="search.php?do=getdaily">$vbphrase[today]</a>)= ($poststoday): $vbphrase[members]:=$numbermembers</div
Reply With Quote
  #47  
Old 05-16-2005, 01:34 AM
ptlink ptlink is offline
 
Join Date: Apr 2005
Posts: 2
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thanks installed
Reply With Quote
  #48  
Old 08-03-2005, 10:04 PM
mcyates mcyates is offline
 
Join Date: Jan 2003
Location: Middlesbrough, Cleveland
Posts: 798
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

My server is 5 hours behind as its in the us and my site is uk based. So at midnight i'd expect the posts to be reset to 0 but this happens at 5am in the morning. Is there anyway to sort this out.
Reply With Quote
  #49  
Old 08-12-2005, 10:58 PM
mcyates mcyates is offline
 
Join Date: Jan 2003
Location: Middlesbrough, Cleveland
Posts: 798
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

*bump*
Reply With Quote
  #50  
Old 08-18-2005, 11:43 AM
Deaths Deaths is offline
 
Join Date: Oct 2004
Location: Europe, Belgium
Posts: 679
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Try looking up the function "mktime" (without quota) on php.net, that'll explain how I used the function and how you can adjust your time to it.
Reply With Quote
Reply

Thread Tools

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 05:51 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.08555 seconds
  • Memory Usage 2,315KB
  • Queries Executed 27 (?)
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
  • (2)bbcode_html
  • (5)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (10)postbit_onlinestatus
  • (10)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_postinfo_query
  • fetch_postinfo
  • 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
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete