Five star voting: Unvote link

Register an Account
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old 07-19-2007, 06:55 AM
Constant Pligger
 
Join Date: Apr 2007
Posts: 1,042
Since I experienced massive misunderstandings by quoting single post URLs that get substituted by the thread name I´ll start a new thread with this topic:
http://forums.pligg.com/general-help...html#post35274

Pligg logs the votes and their value of every user therefore it should be possible to offer an unvote link at user.php?login=USERNAME&view=voted.

If it´s easier: An admin link would be enough for me.

Edit: Since it uses the same table it could be also modified to an unvote at the comments domain.

Last edited by tbones; 07-19-2007 at 08:37 AM.
Reply With Quote
  #2 (permalink)  
Old 07-19-2007, 08:09 PM
Constant Pligger
 
Join Date: Apr 2007
Posts: 1,042
I just analyzed unvote with method 1 (demo.pligg.com):
The JS function unvote has the user id , the story id and the weight of the vote as parameters. Therefore it shouldn´t be extremly difficult to create a plain link with method 2 that calls unvote.

It´s pretty urgent because a dozen of users voted by mistake and mailed me to revert it. Your help is appreciated!
Reply With Quote
  #3 (permalink)  
Old 07-20-2007, 02:41 AM
Constant Pligger
 
Join Date: Apr 2007
Posts: 1,042
Is the vote value unknown in that context? If yes, I could provide a solution in pseudo code:

The dataset is unique with user_id and story_id because the user can´t vote multiple times. So give a marker value as parameter. Let´s say -20.

unvote (user_id, story_id, -20)

function userid (user_id, story_id, vote_value)
{

if {vote_value = -20}

vote_value = SELECT vote_value FROM pligg_votes WHERE user_id = user_id AND story_id = story_id

else {}

.... (function as it is now)

}


My other hot topics:
http://forums.pligg.com/bug-report/7...d-sidebar.html
http://forums.pligg.com/bug-report/7...d-stories.html

Last edited by tbones; 07-20-2007 at 02:46 AM.
Reply With Quote
  #4 (permalink)  
Old 09-14-2007, 02:02 PM
Constant Pligger
 
Join Date: Apr 2007
Posts: 1,042
Would it be easier if only the voter (current id) is allowed to unvote?
Reply With Quote
  #5 (permalink)  
Old 09-15-2007, 02:40 AM
davemackey's Avatar
Pligg Donor
Pligg Version: 9.9.
Pligg Template: siChunkBlue
 
Join Date: Aug 2007
Location: Langhorne, PA
Posts: 226
An unvote link would be a nice feature. Not too hard to implement either.
David.
Reply With Quote
  #6 (permalink)  
Old 09-15-2007, 12:35 PM
not2serious's Avatar
Pligg Donor
Pligg Version: 1.1.5
Pligg Template: Westie
 
Join Date: Apr 2007
Location: East Coast, USA
Posts: 229
I believe the the unvote function with the five star system (vote method 2) would be difficult to implement accurately.

If you allow the use of KARMA in the five star vote method, the overall score would change based on the users weight. This would change every time the cron job is run. This is due to the incorrect formulas in the five star KARMA weighting method: http://forums.pligg.com/bug-report/7...9-6-9-7-a.html.

So far, I have been unable to find someone with coding capabilities to correct this problem. Once corrected, a record of the users weighted vote could be maintained and undone if desired in the future. Since the KARMA weight changes based on the users activity, and unvote after other user activity and the cron job would have different results than what the original vote contributed.

If anyone is interested in working on this, I would be willing to help the best I can.
Reply With Quote
  #7 (permalink)  
Old 09-15-2007, 03:34 PM
Constant Pligger
 
Join Date: Apr 2007
Posts: 1,042
You´re right, not2serious. I would suggest to start with an optional solution for those you aren´t using karma. This solution could be the base for a evolution that has karma in mind.
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Special Advertising Add-On for banners Tutorial AnAlienHolakres3 Questions and Comments 19 10-25-2009 08:56 AM
Simple URL Link for External Voting alokef Questions and Comments 0 03-07-2009 05:48 AM
Rss Import With Star Voting Problem blaze Questions and Comments 2 01-13-2009 01:45 AM
auto publishing with star voting. munns_at_meetup Questions and Comments 5 11-29-2008 06:25 AM
Make star work for voting. cellounge Questions and Comments 2 10-17-2006 11:56 AM


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