? .svn ? vote_up_down-170068.patch ? vote_up_down.module.patch ? alternative/.svn ? documentation/.svn ? documentation/voting_actions_examples/.svn ? images/.svn ? tests/.svn ? theme/.svn ? translations/.svn Index: vote_up_down.module =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/vote_up_down/vote_up_down.module,v retrieving revision 1.24.2.31 diff -u -p -r1.24.2.31 vote_up_down.module --- vote_up_down.module 5 Apr 2009 13:11:00 -0000 1.24.2.31 +++ vote_up_down.module 17 Jul 2009 23:10:35 -0000 @@ -371,39 +371,6 @@ function vote_up_down_block($op = 'list' } /** - * Implementation of hook_userpoints(). - */ -function vote_up_down_userpoints($op, $params = array()) { - switch ($op) { - case 'setting': - $form['vote_updown_points'] = array( - '#type' => 'fieldset', - '#collapsible' => TRUE, - '#collapsed' => TRUE, - '#title' => t('Vote up/down points'), - ); - - $form['vote_updown_points']['userpoints_vote_up_down'] = array( - '#type' => 'textfield', - '#title' => t('Points for voting on a node (requires the Vote Up/Down module)'), - '#default_value' => variable_get('userpoints_vote_up_down', 0), - '#size' => 5, - '#maxlength' => 5, - ); - $form['vote_updown_points']['userpoints_actions'] = array( - '#type' => 'textfield', - '#title' => t('Points for actions (requires the Actions module)'), - '#default_value' => variable_get('userpoints_actions', 0), - '#size' => 5, - '#maxlength' => 5, - ); - - return $form; - break; - } -} - -/** * Menu callback; Handles voteupdown and subpages. */ function vote_up_down_page() { @@ -538,22 +505,6 @@ function vote_up_down_vote($type, $cid, $tag = $tag ? $tag : variable_get('vote_up_down_tag', 'vote'); $vote['tag'] = $tag; - // Userpoints integration. - if (module_exists('userpoints')) { - global $user; - if ($type == 'node') { - $node = db_fetch_object(db_query(db_rewrite_sql('SELECT n.uid FROM {node} n WHERE n.nid = %d'), $cid)); - } - else { - $node = db_fetch_object(db_query(db_rewrite_sql('SELECT c.uid FROM {comments} c WHERE c.cid = %d', 'c', 'cid'), $cid)); - } - $criteria = array('content_type' => $type, 'content_id' => $cid, 'uid' => $user->uid, 'tag' => $tag); - $user_vote = votingapi_select_single_vote_value($criteria); - 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'); - } - } - // Do the voting via Voting API. if ($uid = _vote_up_down_get_uid()) { if ($vote['value'] == 0) {