homepage Welcome to WebmasterWorld Guest from 54.226.173.169
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
Forum Library, Charter, Moderators: coopster & jatar k

PHP Server Side Scripting Forum

    
Calculate Popular links
Majid




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

Hello,


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 ?

 

FourDegreez




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

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.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved