Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Details »»

Version: , by badmeetsevil- badmeetsevil- is offline
Developer Last Online: Jul 2002 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 10-10-2001 Last Update: Never Installs: 24
 
No support by the author.

New Threads Today

Summary of Hack
A simple little hack that is very interesting to have on your forums. If installed correctly, it will show how many threads were started that present day, and reset at midnight. If a thread is deleted, it will be taken off the thread count.

Demo
http://www.soaped-up.com/bbs

Installation

Very simple installation. Download, and open index.php from your forums directory. Find a nice spot anywhere in the file, (maybe under // get total posts) and copy + paste the following:

PHP Code:
// number of threads today
$datecut mktime(0,0,0,date("m"), date("d"), date("y"));
$getthreadstoday=$DB_site->query_first("SELECT count(*) AS count FROM thread WHERE dateline>='$datecut'");
$threadstoday=$getthreadstoday[count]; 
Close the file, and re-upload it to your server.

Go into your Admin Control Panel, open the template "Forum Home" and find the following:

Code:
Total Posts: <b>$totalposts</b>
Immediately following that, paste the following..

Code:
| New Threads Today: <b>$threadstoday</b>
Go to your forum main, and you'll see it in action! If it's not working, please reply to this stating what's wrong.

Enjoy.

Show Your Support

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

Comments
  #12  
Old 01-03-2002, 08:04 AM
Lucky Lucky is offline
 
Join Date: Dec 2001
Posts: 234
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm liking this.

Thanx.
Reply With Quote
  #13  
Old 01-03-2002, 07:34 PM
Okiewan's Avatar
Okiewan Okiewan is offline
 
Join Date: Dec 2001
Posts: 199
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'd LOVE to have this counting posts rather than threads
Reply With Quote
  #14  
Old 01-07-2002, 08:10 PM
TaP TaP is offline
 
Join Date: Nov 2001
Posts: 168
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I have the same problem here...

New Threads Today: 7163

And I only get like a few hundred views a day...heh
Reply With Quote
  #15  
Old 01-20-2002, 03:39 AM
Shenlong's Avatar
Shenlong Shenlong is offline
 
Join Date: Nov 2001
Location: Manhattan, New York
Posts: 167
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

great hack, the more informitive the better
Reply With Quote
  #16  
Old 01-21-2002, 09:52 AM
Lucky Lucky is offline
 
Join Date: Dec 2001
Posts: 234
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Having a little problem here.

The new posts and threads today are the same as the total posts and total threads.

They are not resetting everyday like they should, I think this is the problem.

Any ideas?
Reply With Quote
  #17  
Old 02-23-2002, 11:27 AM
Lucky Lucky is offline
 
Join Date: Dec 2001
Posts: 234
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Works great on 2.2.2
Reply With Quote
  #18  
Old 07-21-2002, 06:36 PM
Webmasta XT's Avatar
Webmasta XT Webmasta XT is offline
 
Join Date: Mar 2002
Posts: 359
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by Lucky
Having a little problem here.

The new posts and threads today are the same as the total posts and total threads.

They are not resetting everyday like they should, I think this is the problem.

Any ideas?
I have the exact same problem on vb 2.2.6
Reply With Quote
  #19  
Old 08-09-2002, 11:49 PM
Destee's Avatar
Destee Destee is offline
 
Join Date: Oct 2001
Location: destee.com
Posts: 75
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks Bad Meets Evil!

Destee
Reply With Quote
  #20  
Old 09-10-2002, 12:21 AM
Exo's Avatar
Exo Exo is offline
 
Join Date: Nov 2001
Posts: 84
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by Palmer ofShinra
It's copy/pasted verbatim from your post.

And I know it's counting threads... I did a comparison of Total Posts, Total Threads and "New Threads Today"

I posted a new thread, and then a normal reply.

Went back and checked the numbers.

Total Threads and New Threads Today both went up the exact same number.
Total Posts went up about 15 more than the others.

It IS counting threads.

What it is NOT doing is resetting at midnight.

Right now it says we have 6689 total threads... and 900 new today.

The only problem is... It's 4am server time. (Central Standard)

We don't get 900 threads a day in any day, even if we get attacked by a flooder. And this stretch of time is our slowest by far.

50 new threads a day is impressive. We normally get between 150-200 visitors a day. They do not start many new threads, as a rule.

Basically, something's wrong with the date cutoff...

same problem here, what can we do??
Reply With Quote
  #21  
Old 09-14-2002, 12:38 AM
Exo's Avatar
Exo Exo is offline
 
Join Date: Nov 2001
Posts: 84
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

hello please help!!
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 11:42 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.04828 seconds
  • Memory Usage 2,308KB
  • Queries Executed 25 (?)
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_code
  • (1)bbcode_php
  • (2)bbcode_quote
  • (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
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)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
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete