Exemplo n.º 1
0
 function remove_vote($user = 0, $value = 10)
 {
     require_once mnminclude . 'votes.php';
     if (!is_numeric($this->id)) {
         return false;
     }
     $vote = new Vote();
     $vote->type = 'comments';
     $vote->user = $user;
     $vote->link = $this->id;
     $vote->value = $value;
     $vote->remove();
     $vote = new Vote();
     $vote->type = 'comments';
     $vote->link = $this->id;
     $this->votes = $vote->count() - $vote->count('<0');
 }
Exemplo n.º 2
0
 function remove_vote($user = 0, $value = 10)
 {
     $vote = new Vote();
     $vote->type = 'links';
     $vote->user = $user;
     $vote->link = $this->id;
     $vote->value = $value;
     $vote->remove();
     $vote = new Vote();
     $vote->type = 'links';
     $vote->link = $this->id;
     if (Voting_Method == 1) {
         $this->votes = $vote->count();
         $this->reports = $this->count_all_votes("<0");
     } elseif (Voting_Method == 2) {
         $this->votes = $vote->rating();
         $this->votecount = $vote->count();
         $this->reports = $this->count_all_votes("<0");
     } elseif (Voting_Method == 3) {
         $this->votes = $vote->count();
         $this->votecount = $vote->count();
         $this->karma = $vote->karma();
         $this->reports = $this->count_all_votes("<0");
     }
     $this->store_basic();
     $vars = array('link' => $this);
     check_actions('link_remove_vote_post', $vars);
 }
Exemplo n.º 3
0
 function remove_vote($user = 0, $value = 10)
 {
     $vote = new Vote();
     $vote->type = 'links';
     $vote->user = $user;
     $vote->link = $this->id;
     $vote->value = $value;
     $vote->remove();
     $vote = new Vote();
     $vote->type = 'links';
     $vote->link = $this->id;
     if (Voting_Method == 1) {
         $this->votes = $vote->count();
         $this->reports = $this->count_all_votes("<0");
     }
     if (Voting_Method == 2) {
         $this->votes = $vote->rating();
         $this->votecount = $vote->count();
         $this->reports = $this->count_all_votes("<0");
     }
     $this->store_basic();
 }