PDA

View Full Version : Number Of Posts On Forumhome Today


eXtremeTim
06-11-2005, 10:00 PM
What does this hack do?

This hack shows the number of posts that have been made today on your forums.

One Template Edit
One New Plugin

Demo: http://www.extremescripts.com/forums/ Look in the whats going on section.

mholtum
06-12-2005, 03:20 AM
Nice work.

Thanks.

Breaker
06-12-2005, 07:03 AM
thanks, very useful :D

Boofo
07-25-2005, 03:14 PM
Can you add the number of threads made today to this, too? ;)

Chris M
07-25-2005, 11:28 PM
Can you add the number of threads made today to this, too? ;)

I've yet to find a way to join two COUNT(*) queries together, but this will work ;)

$starttime = mktime(0, 0, 0, date('m'), date('d'), date('Y'));
$newposts = $db->query_first("SELECT COUNT(*) AS count FROM " . TABLE_PREFIX . "post WHERE dateline >= $starttime");
$newthreads = $db->query_first("SELECT COUNT(*) AS count FROM " . TABLE_PREFIX . "thread WHERE dateline >= $starttime");
$poststoday = vb_number_format($newposts['count']);
$threadstoday = vb_number_format($newthreads['count']);
Sadly, 2 queries per view of the forumhome page -.-

If we could store the data in the datastore that would help >_<

Satan

Pham Tuan Hai
08-14-2005, 12:23 AM
hellsatan ! good job, thx bro.

.Tim
08-14-2005, 12:58 AM
Nice!

Mr Chad
08-15-2005, 05:02 AM
Thx worked fine and was easy and fast.

Installed On: 3.5.0 Beta 2

Pham Tuan Hai
08-15-2005, 08:15 AM
it also works with RC2 :D

Mathiau
09-14-2005, 10:20 PM
nice hack .

P.S your forum is hard on the eyes :(

neolab
10-02-2005, 07:50 AM
Can you add the number of news Members made today to this :)

Thanks

neolab
10-09-2005, 09:41 AM
up thanks :(

Extreme John
10-25-2005, 05:20 AM
Wow fast and easy.. Install Clicked

w00tworld
10-25-2005, 11:25 AM
look good, but would I be correct in saying that it does not work on 3.5.0 gold?

Moncal
10-25-2005, 06:16 PM
Installation was quick and easy. Good job.


*Moncal clicks install*

RaceJunkie
10-26-2005, 12:22 AM
look good, but would I be correct in saying that it does not work on 3.5.0 gold?

Yes I would like to know if this works on Gold?

Moncal
10-26-2005, 01:20 AM
Yes I would like to know if this works on Gold?

I've got it installed on Gold. Works perfectly.

eXtremeTim
11-01-2005, 06:29 AM
The nature of this hack will allow it to work on an 3.5.x version. Since it is just a query.

mcyates
11-06-2005, 07:28 AM
Is there anyway to make the count start from 00:00 until 23:59 on the users selected time mode. For instance im using GMT but it starts counting for me at 05:00 GMT as my server is located in the USA. So its going off the server time rather than the time i've selected.

Thanks in advance

mcyates
11-27-2005, 07:10 PM
Any way of doing the above?

mcyates
11-29-2005, 09:37 PM
I take it this is a no then

folkish
11-30-2005, 11:15 PM
Installed, thanks.

eXtremeTim
09-10-2006, 09:05 PM
I will be updating this for v3.6 today and will include the ability to show the number of threads as well as cache them in the datastore to avoid the extra queries.

Dead End Society
09-12-2006, 01:31 AM
^ Status Timmy?