Welcome to WebmasterWorld Guest from

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

Calculate Popular links



10:36 am on May 8, 2010 (gmt 0)

10+ Year Member


I wrote a small social bookmarking with php,
users can submit a link and another users can give plus to links (we don't have negative vote in our system).

now I want create a formula to found the popular link, I don't have any idea on this ! If I just check the sum of plus may be a link locate on top of popular link for ever !

anybody can give me a solution ?


2:33 pm on May 8, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member

One way to do it is come up with a formula that promotes a link "to the front page." Once a link is promoted, it is fixed in its spot and will scroll off the page as new links are promoted.

Another option is to rank according to plusses divided by the number of days (or hours) since the link was posted. A link posted days ago will need to continue to accumulate a lot of plusses to compete with newly-added links. If you find that just ranking near the top gives old links an unfair advantage, you could add an exponential component to the denominator like: # of plusses / pow(age of link, 1.2)

Note, that is age of link to the "1.2 power"--adjust the number as necessary, but 1.2 has worked for me. By putting an exponential in the denominator, old links will inevitably get sunk over time.

Featured Threads

Hot Threads This Week

Hot Threads This Month