當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Vote::remove方法代碼示例

本文整理匯總了PHP中Vote::remove方法的典型用法代碼示例。如果您正苦於以下問題:PHP Vote::remove方法的具體用法?PHP Vote::remove怎麽用?PHP Vote::remove使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Vote的用法示例。


在下文中一共展示了Vote::remove方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: Vote

 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');
 }
開發者ID:bendroid,項目名稱:pligg-cms,代碼行數:17,代碼來源:comment.php

示例2: Vote

 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);
 }
開發者ID:Grprashanthkumar,項目名稱:ColfusionWeb,代碼行數:28,代碼來源:link.php

示例3: Vote

 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();
 }
開發者ID:pantofla,項目名稱:geez,代碼行數:22,代碼來源:link.php


注:本文中的Vote::remove方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。