vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Graveyard (https://vborg.vbsupport.ru/forumdisplay.php?f=224)
-   -   Number Of Posts On Forumhome Today (https://vborg.vbsupport.ru/showthread.php?t=82926)

eXtremeTim 06-11-2005 10:00 PM

Number Of Posts On Forumhome Today
 
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

Quote:

Originally Posted by Boofo
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 ;)

PHP Code:

$starttime mktime(000date('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

Quote:

Originally Posted by w00tworld
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

Quote:

Originally Posted by RaceJunkie
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?


All times are GMT. The time now is 05:32 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.01137 seconds
  • Memory Usage 1,757KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_php_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (24)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete