|
|
|
|
|
by Geee
5209 days ago
|
|
I've implemented this in one project with the addition that allows entries to 'keep afloat', or resurface if they are suddenly voted a lot. So, the behavior is more like what you would see in 'Popular now' list on Youtube, without having to compute running averages. The way I did it was to update the post time with fractional of the difference of the old timestamp and current time, i.e: post_time += (current_time - post_time)/10
That way, if the post is really old, voting gives a decent boost to it, but if it's more recent, it has negligible effect. |
|