PDA

View Full Version : Cute little hack: Avg. Posts Per Hour!


Ruben J.
10-03-2001, 03:54 AM
PPH: Posts Per Hour.

As of now I do not have access to the code [not written by me], so I cant post it yet, but I was wondering if it already exists...

One of my crew members said that it would be reasonably easy to calculate the avg posts per hour a user posts, and the implementing it into the code would be reasonably easy too. It could be parsed under the total posts in the left column or something:

Posts: 800
PPH: 0.345


Why this post before the code can be published?
My question is: has this already been done, or is it new? :)

The code [if new] will be available tomorrow or the day after that if anyone is interested in it.

Lemme know what you think! :)

Palmer ofShinra
10-05-2001, 05:38 PM
That should be excessively easy, as long as you weren't looking for true precision (being that it's accurate to the hour, from the hour the user registered to the current hour)

All you have to do is take the avg posts per day and divide it by 24, then display that number.

It's not perfectly accurate, but it's close enough for my liking.

I think I'll try this... our members would be endlessly amused by it.

soceris
10-08-2001, 06:42 PM
anybody got anything for this yet???

Palmer ofShinra
10-09-2001, 09:14 AM
OK... try this.

Open member.php

Find
} else {
$postsperday = sprintf("%.2f",($userinfo[posts] / $jointime));
}

Right underneath that line, add:

$postsperhour = ($postsperday / 24);

=============

That's that.

Then, go into your getinfo template and add the field whoeer you want.
Just add a line saying "Posts per hour: $postsperhour"

That's it...