当前位置: 首页>>代码示例>>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;未经允许,请勿转载。