![]() |
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:
Go into your Admin Control Panel, open the template "Forum Home" and find the following: Code:
Total Posts: <b>$totalposts</b> Code:
| New Threads Today: <b>$threadstoday</b> Enjoy. |
I did something similar as a change for the "today's active topics" link. I noticed how it didn't actually show today's active topics, but rather showed the topics from the last 24 hours. Here's the change I made in search.php:
Find this: $datesql=" AND thread.lastpost>=".(time()-24*60*60); Replace with this: $datesql=" AND thread.lastpost>=".(mktime(0,0,0,date("m"), date("d"), date("Y"))); |
Yes, that's the current coding for this hack. Gotta love it. :)
|
I like it~~~
it's worked. thank you very much. |
Great little hack, I like these sorts. :) Thanks.
|
Thanks :)
I'm trying to make an addon, so it counts how many new posts from individual forums. |
Hmm... doesn't seem to be working right for me...
I copy/pasted it all nice... And it's half working. Basically, it doesn't seem to be resetting at midnight. It says we have 903 new threads... less than an hour after midnight. It was at 891 before midnight. And 856 yesterday. What's up with it? |
Well, you forum is quite big (post/thread) count wise. It's very possible that you've gotten 900 new threads.
..but if you know this is false, check the coding. Make sure that Code:
("SELECT count(*) AS count FROM thread WHERE dateline>='$datecut'"); |
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... |
Isn't there already an option in the cp to find out the number of new threads made each day under the "vb stats" link?
|
I'm liking this.
Thanx. |
I'd LOVE to have this counting posts rather than threads :)
|
I have the same problem here...
New Threads Today: 7163 And I only get like a few hundred views a day...heh |
great hack, the more informitive the better
|
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? |
Works great on 2.2.2
|
Quote:
|
Thanks Bad Meets Evil!
Destee |
Quote:
same problem here, what can we do?? :( |
hello please help!! :)
|
Can it be changed to accustom 3.5.2????
|
Quote:
Look at my profile. |
All times are GMT. The time now is 02:41 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|