[WGBB] Daily Post Count

[WGBB] Daily Post Count 1.0.3

No permission to download
Couple of suggestions/questions.

1. Would it be possible to specify the timezone. For example our server is hosted in the US but we're based in Aus so the post counter ticks over at about 1pm, not midnight.
2. Not display until there's at least 1 post or registration?

Thanks for a great little addon too :).
 
Couple of suggestions/questions.

1. Would it be possible to specify the timezone. For example our server is hosted in the US but we're based in Aus so the post counter ticks over at about 1pm, not midnight.
2. Not display until there's at least 1 post or registration?

Thanks for a great little addon too :).
I will try to update the addon with your 2nd suggestion. The first one, I don't know if I will be able to make it! :-/

Suggestion. It may be interesting to allow it to display your post per day ratio since registration. vBulletin used to have this at some point IIRC. :)
I will try this one too! :)


Thanks for your suggestions!
 
And sorry about the time it took to respond also CFodder. I think Mr Xpl0iter was a silly billy and lost his back-ups xD

Lol, no problem. And with regards to my first suggestion maybe one of the other addon developers here may be able to help you with it???
 
I don't know mate, thats really complicated unless I recode the entire addon I believe!
I calculate the number of posts and registered members depends on the db time which is the system time I believe.

Now I can't even think of a way on how to get the number of posts/regs for each person's timezone. May be I am not thinking it straight! :P
 
Does this work along with Xenporta ? If not... Would you be looking to create a block for Xenporta ? That would be awesome :p
 
will this work with 1.2?
It will work with 1.2 as expected.

I will be releasing an update soon to officially have it on 1.2 with a few changes that some people have suggested.
If you do happen to encounter any errors, please let us know!
 
With this addon enabled, it makes my site slow and lags each time a page loads or any action is taken on the site.

Once disabled, it's fine.

Please fix this asap as it's a very useful add-on.

I'm using 1.2.2 xenforo and 1.0.2 version of this add-on.
 
Tip to the developer, that query you run is very extensive on larger forums. If the post table has a lot of rows, it's going to take a while to run and possibly jam the database like @ineedhelp is talking about. I ran into a similar problem with my hashtag add on, it runs practically the same query (just for different results obviously). You should look into caching the numbers and extending the post datawriter and adding a deferred method after insert to update the stats for that person.

[EDIT] @Chris Deeming pointed out it's an entirely different query. My recommendation for caching and deferring still applies though.
 
Last edited:
Tip to the developer, that query you run is very extensive on larger forums. If the post table has a lot of rows, it's going to take a while to run and possibly jam the database like @ineedhelp is talking about. I ran into a similar problem with my hashtag add on, it runs practically the same query (just for different results obviously). You should look into caching the numbers and extending the post datawriter and adding a deferred method after insert to update the stats for that person.

[EDIT] @Chris Deeming pointed out it's an entirely different query. My recommendation for caching and deferring still applies though.
This is the query in this add-on for daily posts vs my query in the version I did
Code:
mysql> SELECT COUNT( * ) AS posts, FROM_UNIXTIME( post_date,  '%Y-%m-%d' ) AS DATE
    -> FROM xf_post
    -> WHERE FROM_UNIXTIME( post_date,  '%Y-%m-%d' ) = CURDATE( );
+-------+------------+
| posts | DATE      |
+-------+------------+
|    24 | 2013-10-07 |
+-------+------------+
1 row in set (0.13 sec)

Code:
mysql> SELECT COUNT(*)
    -> FROM xf_post
    -> WHERE post_date > UNIX_TIMESTAMP(CURDATE( ));
+----------+
| COUNT(*) |
+----------+
|      24 |
+----------+
1 row in set (0.00 sec)

and that's against 250,000 posts
 
Top Bottom