Gravity mode for submissions voting would rock

Register an Account
Pligg Chat Room
Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 10-17-2007, 08:20 PM
New Pligger
 
Join Date: Oct 2007
Posts: 3
Pligg submissions currently follow a predictable path Upcoming->New->Page 1->Page 2->Page 3.

It would be nice to have a mode similar to reddit where the position of a submission rises and falls based on votes. So for example, a "gravity" algorithm pulls those items without recent votes down, and the oldest fall the farthest. A recent vote is a push against gravity which raises the items in the queue. The advantage is that this system will have a changing mix of new and old and give users incentive to click deeper into the site. Additionally, content which is still interesting can have a longer life on the front page before disappearing.

Thanks,

Pligglet
Reply With Quote
  #2 (permalink)  
Old 10-17-2007, 09:54 PM
dollars5's Avatar
Pligg Donor
 
Join Date: Dec 2006
Location: India
Posts: 1,961
good idea - but tweaking the formulas would get what you need i guess. Feel free to play with the Admin -> Modify formulas - hope it should help you.
Reply With Quote
  #3 (permalink)  
Old 10-18-2007, 01:14 AM
nzbullet's Avatar
Constant Pligger/Coder
 
Join Date: Jun 2007
Location: New Zealand
Posts: 115
Quote:
Originally Posted by Pligglet View Post
Pligg submissions currently follow a predictable path Upcoming->New->Page 1->Page 2->Page 3.

It would be nice to have a mode similar to reddit where the position of a submission rises and falls based on votes. So for example, a "gravity" algorithm pulls those items without recent votes down, and the oldest fall the farthest. A recent vote is a push against gravity which raises the items in the queue. The advantage is that this system will have a changing mix of new and old and give users incentive to click deeper into the site. Additionally, content which is still interesting can have a longer life on the front page before disappearing.

Thanks,

Pligglet
I have changed mine so that when someone votes or comments on a story (in fact anytime a story is changed in anyway) it gets pushed to the top. This is great for busy sites as the top stories are always changing an old stories can be pushed to the top if someone votes or comments on them.
It doesn't just move it up the table by one it moves it directly to the top.
Sometimes it's not so good as you don't want a story that is year old on the front page, however, if someone is talking about it then why not?

To do it follow these simple steps:
Open index.php

Go to (around line 35):

Code:
if(!isset($_REQUEST['search'])){$search->orderBy = "link_published_date DESC";}
and change to:

Code:
if(!isset($_REQUEST['search'])){$search->orderBy = "link_modified DESC";}
Done!

To try it out go to Linka / Published Links and vote on an older story and you will see it jump to the front page (you would have to register on the site though)
Reply With Quote
  #4 (permalink)  
Old 10-18-2007, 01:28 AM
dollars5's Avatar
Pligg Donor
 
Join Date: Dec 2006
Location: India
Posts: 1,961
Dan - actually Pligglet wanted to promote as well as display stories in gravity mode as in reddit.com - say if more votes in short term - it will be on front page - untill some other story breaks its rank in that given duration and votes (burries also counted) - which is totally new to pligg - was thinking of just modifying formulas - it will only help in a way to manipulate the promotion - but Pligglet's requirements are to manipulate while in frontpage too.
Reply With Quote
  #5 (permalink)  
Old 10-18-2007, 02:11 AM
nzbullet's Avatar
Constant Pligger/Coder
 
Join Date: Jun 2007
Location: New Zealand
Posts: 115
ah ok - my bad
Reply With Quote
  #6 (permalink)  
Old 10-18-2007, 09:39 AM
New Pligger
 
Join Date: Oct 2007
Posts: 3
Hey Linka and dollars5,

Thanks for the help. Linka, your code change is a good tweak and I'm using it now, so thanks! In terms of the formulas, I'm a little lost.

I was hoping that Bury would subtract a vote and move it down, or do something useful. I've yet to notice an effect from multiple buries. I'm unclear on how formulas would change the position. Do you have any examples/suggestions.

Although making bury more powerful is dangerous, I suppose. One of my only regulars "buries" everything. And I do mean EVERYTHING. I think she's using it to "hide" everything she's already looked at. Sadly, she's my most frequent user.

Pligglet
Reply With Quote
  #7 (permalink)  
Old 10-18-2007, 09:43 AM
dollars5's Avatar
Pligg Donor
 
Join Date: Dec 2006
Location: India
Posts: 1,961
Actually we did for a client to have a very custom formula and it involved few code changes that did more than just ordering the posts. If you are looking for just ordering based on any recent activity linka's code would come to your rescue.
Reply With Quote
  #8 (permalink)  
Old 10-19-2007, 01:12 AM
nzbullet's Avatar
Constant Pligger/Coder
 
Join Date: Jun 2007
Location: New Zealand
Posts: 115
Quote:
Originally Posted by dollars5 View Post
Actually we did for a client to have a very custom formula and it involved few code changes that did more than just ordering the posts. If you are looking for just ordering based on any recent activity linka's code would come to your rescue.
Hey Dollars5,

I have a request for a mod....Based on my code above, if someone buries a story it gets pushed to the top, as there has been some kind of action taken on that story. Would you know how I could code it so that bury does two things.
1. remove a single vote
2. (more importantly) NOT move it to the top of the front page

If need be you could email or pm me.

Cheers

Dan
Reply With Quote
  #9 (permalink)  
Old 10-24-2007, 12:25 AM
not2serious's Avatar
Pligg Donor
Pligg Version: v0.96 w/modifications
Pligg Template: Yget w/modifications
 
Join Date: Apr 2007
Location: East Coast, USA
Posts: 205
I am going to try this mod in both the published and upcoming. I would like something that would not be a aggressive as sending a story to the top position, but for now, I think this could make things interesting for my site.
Reply With Quote
  #10 (permalink)  
Old 11-15-2007, 11:31 AM
New Pligger
 
Join Date: Mar 2007
Posts: 3
I'm trying to figure out a reddit-like "gravity" algorithm as well, but when it comes to coding I'm pretty much retarded.

But I think something this would be good:

gravity = link_votes/$days

and then

if(!isset($_REQUEST['search'])){$search->orderBy = "gravity DESC";}



I'm trying to divide the number of votes by the number of days ago it was submitted to get "gravity" and use that to decide the order of links on index.php. I think it would work well with the Stars voting method. I just don't know how to do it.


If anyone can figure out how to do that, or something similar, I think a lot of people would use it.
Reply With Quote
Reply

Thread Tools
Display Modes




Pligg Modules and Pligg Templates from Pligg Pro Find support on the Pligg CMS Forum - 24 hours a day! Make a donation to support Pligg CMS development