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

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment!
Scam Warning
Locked
User avatar
MartectX
Translator
Posts: 1324
Joined: Wed Dec 19, 2007 8:05 pm
Location: Marienplatz

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

Post by MartectX » Fri Sep 12, 2008 6:29 am

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
Last edited by MartectX on Sun Sep 28, 2008 11:19 pm, edited 4 times in total.

User avatar
Sunka
Registered User
Posts: 566
Joined: Wed Mar 26, 2008 2:48 pm
Location: Croatia, Zvoneca
Contact:

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

Post by Sunka » Fri Sep 12, 2008 7:42 am

Looking interesting...I love statistic information of my forum... :mrgreen:
Waiting for MOD
www.pijanitvor.com

Gardening & Fishing - If you want, I will open english subforum for you ==> send me PM here ||

Error101Burke
Registered User
Posts: 18
Joined: Sun Sep 07, 2008 12:16 pm

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

Post by Error101Burke » Sun Sep 14, 2008 5:11 am

Yeah, that'd be cool.

User avatar
MartectX
Translator
Posts: 1324
Joined: Wed Dec 19, 2007 8:05 pm
Location: Marienplatz

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

Post by MartectX » Tue Sep 16, 2008 9:40 pm

BETA 1 ready for download.

User avatar
MartectX
Translator
Posts: 1324
Joined: Wed Dec 19, 2007 8:05 pm
Location: Marienplatz

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

Post by MartectX » Fri Sep 19, 2008 7:54 pm

Version 0.0.2
  • German language edits
  • subSilver2 edits

User avatar
MartectX
Translator
Posts: 1324
Joined: Wed Dec 19, 2007 8:05 pm
Location: Marienplatz

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

Post by MartectX » Wed Sep 24, 2008 3:13 pm

I'd submit this to the mod database tonight if there are no complaints - works perfectly on my live board, though.

User avatar
RMcGirr83
Recognised Extension Developer
Posts: 20424
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr
Contact:

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

Post by RMcGirr83 » Wed Sep 24, 2008 5:12 pm

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? :?
In times of change, learners inherit the earth, while the learned find themselves beautifully equipped to deal with a world that no longer exists - Eric Hoffer
Former Modifications/Extensions Team Member | My extensions
Appreciate the extensions/mods/support then buy me a beer
All requests for support via PM will be ignored

User avatar
MartectX
Translator
Posts: 1324
Joined: Wed Dec 19, 2007 8:05 pm
Location: Marienplatz

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

Post by MartectX » Wed Sep 24, 2008 10:33 pm

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!

User avatar
RMcGirr83
Recognised Extension Developer
Posts: 20424
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr
Contact:

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

Post by RMcGirr83 » Sat Sep 27, 2008 12:43 pm

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. :)
In times of change, learners inherit the earth, while the learned find themselves beautifully equipped to deal with a world that no longer exists - Eric Hoffer
Former Modifications/Extensions Team Member | My extensions
Appreciate the extensions/mods/support then buy me a beer
All requests for support via PM will be ignored

User avatar
MartectX
Translator
Posts: 1324
Joined: Wed Dec 19, 2007 8:05 pm
Location: Marienplatz

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

Post by MartectX » Sat Sep 27, 2008 2:22 pm

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!


Locked

Return to “[3.0.x] MODs in Development”

Who is online

Users browsing this forum: No registered users and 23 guests