8a9,14
> function userpoints_votingapi_author($entity_type, $entity_id) {
>     $entity_id_name = $entity_type[0]."id";
>     $entity_type .= ($entity_type == "node")? "": "s";
>     $uid = db_result(db_query("SELECT uid FROM {%s} WHERE %s = %d", $entity_type, $entity_id_name, $entity_id));
>     return $uid;
> }
33c39,40
<       '#title' => t('!Points for voting', userpoints_translation()),
---
>       '#title' => t('!Points for node author', userpoints_translation()),
>       '#description' => t('How many points node author earn or lose.'),
38a46,61
>     $form[$group][userpoints_votingapi_vote_voter] = array(
>       '#type' => 'textfield',
>       '#title' => t('!Points for node voter', userpoints_translation()),
>       '#default_value' => variable_get(userpoints_votingapi_vote_voter, 1),
>       '#description' => t('Users get points as they vote for node. Only positive, not negative.'),
>       '#size' => 5,
>       '#maxlength' => 5,
>     );
> 
>     $form[$group][userpoints_votingapi_voter] = array(
>       '#type' => 'checkbox',
>       '#title' => t('Add points to voter'),
>       '#default_value' => variable_get(userpoints_votingapi_voter, 0),
>       '#description' => t('Add user points to voter.'),
>     );
> 
67,68c90,91
<     'uid' => $vote['uid'],
<     'points' => variable_get(userpoints_votingapi_vote, 1),
---
>     'uid' => userpoints_votingapi_author($vote['content_type'], $vote['content_id']),
>     'points' => (($vote['value']<0)?-1:+1) * variable_get(userpoints_votingapi_vote, 1),
77a101,114
>   if (variable_get(userpoints_votingapi_voter, 0)) {
>     userpoints_userpointsapi(array(
>       'uid' => $vote['uid'],
>       'points' => variable_get(userpoints_votingapi_vote_voter, 1),
>       'moderate' => variable_get(userpoints_votingapi_moderation, 0),
>       'event' => $vote['tag'],
>       'entity_id' => $vote['content_id'],
>       'entity_type' => $vote['content_type'],
>       'operation' => t('vote'),
>       'tid' => variable_get('userpoints_votingapi_tid', 0),
>       'description' => t('Vote cast: !content_type !content_id.',array('!content_type'=> $vote['content_type'], '!content_id'=> $vote['content_id'])),
>       )
>     );
>   }
90,91c127,128
<     'uid' => $vote['uid'],
<     'points' => -1 * variable_get(userpoints_votingapi_vote, 1),
---
>     'uid' => userpoints_votingapi_author($vote['content_type'], $vote['content_id']),
>     'points' => -1 * (($vote['value']<0)?-1:+1) * variable_get(userpoints_votingapi_vote, 1),
100a138,151
>   if (variable_get(userpoints_votingapi_voter, 0)) {
>     userpoints_userpointsapi(array(
>       'uid' => $vote['uid'],
>       'points' => -1 * variable_get(userpoints_votingapi_vote_voter, 1),
>       'moderate' => variable_get(userpoints_votingapi_moderation, 0),
>       'event' => $vote['tag'],
>       'entity_id' => $vote['content_id'],
>       'entity_type' => $vote['content_type'],
>       'operation' => t('vote'),
>       'tid' => variable_get('userpoints_votingapi_tid', 0),
>       'description' => t('Vote cast: !content_type !content_id.',array('!content_type'=> $vote['content_type'], '!content_id'=> $vote['content_id'])),
>       )
>     );
>   }
107c158,159
< }
\ В конце файла нет новой строки
---
> }
> 
