Page 1 of 1

[MODDB] "Posts per day" in Statistics Box 1.0.0

Posted: Fri Sep 12, 2008 6:29 am
by MartectX
MOD Title: Posts per day
MOD Description: Adds a little extra info to the statistic box on the index page: Average posts per day since the board came into existence.
MOD Version: 1.0.0
MOD Download: http://mods.martectx.de/posts_per_day.zip

Image

Re: [DEV] "Posts per Day" in Statistics Box

Posted: Fri Sep 12, 2008 7:42 am
by Sunka
Looking interesting...I love statistic information of my forum... :mrgreen:
Waiting for MOD

Re: [DEV] "Posts per Day" in Statistics Box

Posted: Sun Sep 14, 2008 5:11 am
by Error101Burke
Yeah, that'd be cool.

Re: [BETA] "Posts per day" in Statistics Box

Posted: Tue Sep 16, 2008 9:40 pm
by MartectX
BETA 1 ready for download.

Re: [BETA] "Posts per day" in Statistics Box

Posted: Fri Sep 19, 2008 7:54 pm
by MartectX
Version 0.0.2
  • German language edits
  • subSilver2 edits

Re: [BETA] "Posts per day" in Statistics Box

Posted: Wed Sep 24, 2008 3:13 pm
by MartectX
I'd submit this to the mod database tonight if there are no complaints - works perfectly on my live board, though.

Re: [BETA] "Posts per day" in Statistics Box

Posted: Wed Sep 24, 2008 5:12 pm
by RMcGirr83
I would make a small suggestion. According to the code

Code: Select all

$boarddays = ( time() - $config['board_startdate'] ) / 86400;
$posts_per_day = $total_posts / $boarddays;
it would be possible, however unlikely, that a new board with some posts in it during the first day will return inaccurate information. For example, let's say a new board has 10 posts and the $boarddays turns out to be .5....that would result in $posts_per_day = 20. So possibly a fix would be something like this?

Code: Select all

$boarddays = ( time() - $config['board_startdate'] ) / 86400;
$boarddays = ($boarddays <= 1) ? '1' : $boarddays;
$posts_per_day = $total_posts / $boarddays;
or am I being too picky? :?

Re: [BETA] "Posts per day" in Statistics Box

Posted: Wed Sep 24, 2008 10:33 pm
by MartectX
RMcGirr83 wrote:[...] or am I being too picky? :?
Nah, it's good; I'll see to it that this will make it into the final version. Thanks for your suggestion!

Re: [BETA] "Posts per day" in Statistics Box

Posted: Sat Sep 27, 2008 12:43 pm
by RMcGirr83
I changed your code on my forum to this in index.php

Code: Select all

// posts per day
$boarddays = round(( time() - $config['board_startdate'] ) / 86400);
$boarddays = ($boarddays <= 1) ? '1' : $boarddays;
$posts_per_day = $total_posts / $boarddays;
$l_posts_per_day_s = ($posts_per_day == 0) ? 'POSTS_PER_DAY_ZERO' : 'POSTS_PER_DAY_OTHER';
and it seems to be working very well. :)

Re: [RC] "Posts per day" in Statistics Box 1.0.0

Posted: Sat Sep 27, 2008 2:22 pm
by MartectX
Version 1.0.0
  • Release
  • Now supports MOD Version Check
For updating from 0.0.2 just redo the very first change of index.php!

Re: [MODDB] "Posts per day" in Statistics Box 1.0.0

Posted: Sun Sep 28, 2008 11:20 pm
by MartectX