--- vote_up_down.module.orig 2007-08-24 01:15:48.000000000 -0400 +++ vote_up_down.module 2007-08-24 01:15:15.000000000 -0400 @@ -315,6 +315,13 @@ '#size' => 5, '#maxlength' => 5, ); + $form['vote_updown_points']['userpoints_vote_up_down_karma'] = array( + '#type' => 'textfield', + '#title' => t('Points resulting from vote on a node user authored (requires the Vote up/down module)'), + '#default_value' => variable_get('userpoints_vote_up_down_karma', 0), + '#size' => 5, + '#maxlength' => 5, + ); return $form; break; @@ -465,6 +472,12 @@ if ($user->uid && !$user_vote && ($node->uid != $user->uid) && ($vote->value != 0)) { userpoints_userpointsapi('points', variable_get('userpoints_vote_up_down', 0), $user->uid, 'Vote up/down points'); } + // update userpoints based on the vote value + if ($vote->value != 0) { + if ( variable_get('userpoints_vote_up_down_karma', 0) ) { + userpoints_userpointsapi('points', ($vote->value * variable_get('userpoints_vote_up_down_karma', 0)), $node->uid, 'Vote up/down karma'); + } + } } // Do the voting via voting api.