Go Back   Pligg Forum > Announcements > Drawing Board
Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 07-19-2007, 04:55 AM
tbones tbones is offline
Constant Pligger
 
Join Date: Apr 2007
Posts: 1,073
Downloads: 26
Uploads: 0
Thanks: 53
Thanked 25 Times in 23 Posts
Five star voting: Unvote link

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:
Unvote doesn't decrease vote count

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 06:37 AM.
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 07-19-2007, 06:09 PM
tbones tbones is offline
Constant Pligger
 
Join Date: Apr 2007
Posts: 1,073
Downloads: 26
Uploads: 0
Thanks: 53
Thanked 25 Times in 23 Posts
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, 12:41 AM
tbones tbones is offline
Constant Pligger
 
Join Date: Apr 2007
Posts: 1,073
Downloads: 26
Uploads: 0
Thanks: 53
Thanked 25 Times in 23 Posts
Question

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:
v9.5: Submit step 3 related sidebar
v9.5: Comments to discarded stories

Last edited by tbones : 07-20-2007 at 12:46 AM.
Reply With Quote
  #4 (permalink)  
Old 09-14-2007, 12:02 PM
tbones tbones is offline
Constant Pligger
 
Join Date: Apr 2007
Posts: 1,073
Downloads: 26
Uploads: 0
Thanks: 53
Thanked 25 Times in 23 Posts
Would it be easier if only the voter (current id) is allowed to unvote?
Reply With Quote
  #5 (permalink)  
Old 09-15-2007, 12:40 AM
davemackey's Avatar
davemackey davemackey is offline
Pligg Donor
Pligg Version: 9.9.
Pligg Template: siChunkBlue
 
Join Date: Aug 2007
Location: Langhorne, PA
Posts: 297
Downloads: 8
Uploads: 0
Thanks: 31
Thanked 24 Times in 18 Posts
An unvote link would be a nice feature. Not too hard to implement either.
David.
Reply With Quote
  #6 (permalink)  
Old 09-15-2007, 10:35 AM
not2serious's Avatar
not2serious not2serious is offline
Pligg Donor
Pligg Version: v0.96 w/modifications
Pligg Template: Yget w/modifications
 
Join Date: Apr 2007
Location: East Coast, USA
Posts: 226
Downloads: 29
Uploads: 0
Thanks: 16
Thanked 16 Times in 15 Posts
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: Star Vote Problems 9.6 - 9.7.

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.
__________________
My Pligg Site: Critique My Art
My Arts Directory: Links 2 Arts
Reply With Quote
  #7 (permalink)  
Old 09-15-2007, 01:34 PM
tbones tbones is offline
Constant Pligger
 
Join Date: Apr 2007
Posts: 1,073
Downloads: 26
Uploads: 0
Thanks: 53
Thanked 25 Times in 23 Posts
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
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Similar Threads
Thread Thread Starter Forum Replies Last Post
Voting from external frame ramos67 Pligg Mods 34 08-25-2008 02:38 PM
Change when bury link appears jmundane General Help 5 07-02-2008 09:45 AM
Average Star Rating aaronpais General Help 0 05-20-2007 09:38 AM
Can the URL link be made more visible / title link? jon General Help 2 03-21-2007 02:30 PM
Make star work for voting. cellounge Pligg Templates 2 10-17-2006 09:56 AM


LinkBacks Enabled by vBSEO 3.0.0