Hmm, I was thinking of this one day, you are talking about something that calculates the most 'hot' topic right ?
Maybe it's just me but I did this a little complicated
Here is how I would do it (note not tested!):
Fist I select unix timestamp time of all posts (threads and replys) on the board the last 3 days.
Then I calculate the unix timestamp value of the exact same time 3 days ago and I round() that value to minutes (devide by 60), lets call that value $x. Then for each row (post) I get from the database I do the following:
round() the unix timestamp into minutes, lets call that $y.
then I take $y - $x = $y
then I take $y to the power of 2, and assign that to the $y variable.
then I take the $y and devide it by 1000 and use ceil()
then for each thread I sum up the value of $y that all posts got and then I multiply that value with the square root of the number of posts in that thread.
I have not tried this but at the time I wrote it I thought a lot about how to do this thing, that is calculate the 'hottest' topic and I belive this works, note that your board needs a bit of activity so that this could work.
Example Unix timestamp of post: 1051975886
Example current Unix timestamp: 1051978951
60 * 24 * 3 = 4320 //calculate the minutes in 3 days
//calculate the minutes since 1970 until 3 days ago
round((1051978951 / 60)) - 4320 = 17528663
//get the time in minutes after 3 days ago when the post was submitted
round((1051975886 / 60)) - 17528663 = 4268
//place that time in the power of 2 so posts that were posted sooner are more important then old ones
4268 ^ 2 = 77745136832
//devide by 1000 and raise the value to integer
ceil((77745136832 / 1000)) = 77745137
//then sum up all these values that belong to each thread
//and then multiply the result by the square root of the number of replies
Hope that helps