Closed (won't fix)
Project:
Vote Up/Down
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
13 Feb 2009 at 04:35 UTC
Updated:
30 Sep 2011 at 09:14 UTC
Jump to comment: Most recent file
Comments
Comment #1
Apollo610 commentedJust to add, this is in my template.php (which should be implied, since the voting is working, but I just want to be clear).
Comment #2
eddanx commentedI haven't researched this thoroughly, but at least for me with Drupal 6.9 and most recent dev version of vote/up down and latest release of userpoints, I had to modify modules/vote_up_down/vote_up_down.module around #530 to look like:
I don't like to stay off-topic, but I wanted to award the author of the node with user points, and not the one voting, so I actually have this:
I'm currently looking into giving the author positive points when his node gets voted up and negative when voted down. My first thought was just going:
$givepoints = $vote['value'] * variable_get('userpoints_vote_up_down', 0);But if a user changes his vote, it doesn't update the userpoints for the author.
Comment #3
Apollo610 commented@eddanx - much thanks for the feedback... I'm just slightly confused about where you're placing your first block of code... are you placing it inside of the
function vote_up_down_vote($type, $cid, $value, $tag = NULL, $ajax = FALSE, $alt = FALSE)function?I've tried multiple placements and I can't get the aggregation of votes to be counted against the user's userpoints... if you don't mind can you paste the relevant block of code from .module that's working? I'd love to get this up and running on my site.
For what it's worth, your other suggestions (which are by no means off topic to this thread IMO) are fantastic. It would be nice to have all of these options built into Vote Up/Down to make it more robust. Any way you can work with the maintainer (lut4rp) to get them implemented? That would be wonderful.
Comment #4
Funkymoses commentedyes, he is. the code replaces this:
I'm looking into doing this as well.
Comment #5
techypaul commentedHi,
I would like to give 1 pt to the voter and 1 pt to the commenter (or take off 2 if negative). Is the only way to do this by editing the module directly?
Thanks,
Paul.
Comment #6
malclocke commentedHi all.
vote_up_down userpoints integration does not work, as stated in the comments above. Userpoints are never applied to a user when voting.
This is due to vote_up_down calling userpoints_userpointsapi() with incorrect parameters. It looks like vote_up_down is using an older argument format (perhaps from 5.x). userpoints_userpointsapi() now takes only one parameter, either an array or an integer. If an integer is supplied, that many points are added for the current user, which is what we want. See line 446 in userpoints.module for all the gory details.
The attached patch fixes this, adds a check for errors and adds a watchdog message on failure.
I think the discussion about giving more than one user points probably belongs in a different issue. The initial issue was basically reporting a bug, userpoints functionality doesn't work.
Malc
Comment #7
gausarts commentedSubscribing. Any updates? Thanks
Comment #8
DomDoze commentedSubscribing
Comment #9
marvil07 commentedmalclocke: thanks for the clean update.
I'm not a user points module user, so can anyone confirm the new patch solves the problem?
Comment #10
marvil07 commentedSince
6.x-1.xis not anymore maintained, I'm closing this.Please re-open if this happens on
6.x-2.x.Comment #11
superfedya commentedThere is a way to integrate Vote Up/Down with Userpoints? When user vote it must give +1 or -1 to node creator.
I used Userpoints Karma but with this module it's inpossible to vote for annonymous users.
So, maybe I can do that with Vote Up/Down, Userpoints, Rules and Votingpoints (form userpoint_contib).
Any idea how I can do that?
Thanks!
Comment #12
marvil07 commented@superfedya: Please do not hijack issues. you want to integrate votingapi with userpoints.