当前位置: 首页>>代码示例>>PHP>>正文


PHP qa_html_theme_base::c_item_main方法代码示例

本文整理汇总了PHP中qa_html_theme_base::c_item_main方法的典型用法代码示例。如果您正苦于以下问题:PHP qa_html_theme_base::c_item_main方法的具体用法?PHP qa_html_theme_base::c_item_main怎么用?PHP qa_html_theme_base::c_item_main使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在qa_html_theme_base的用法示例。


在下文中一共展示了qa_html_theme_base::c_item_main方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: c_item_main

 function c_item_main($c_item)
 {
     if ($this->is_print_view) {
         if (isset($c_item['url'])) {
             $this->c_item_link($c_item);
         } else {
             $this->c_item_content($c_item);
         }
         $this->output('<DIV CLASS="qa-c-item-footer">');
         $this->post_meta($c_item, 'qa-c-item');
         $this->output('</DIV>');
     } else {
         qa_html_theme_base::c_item_main($c_item);
     }
 }
开发者ID:NoahY,项目名称:q2a-print,代码行数:15,代码来源:qa-print-layer.php

示例2: c_item_main

 function c_item_main($c_item)
 {
     global $topage;
     if (qa_opt('voting_on_cs') && is_array($this->comment_votes) && isset($c_item['content']) && !isset($c_item['url']) && !strpos($c_item['content'], 'question-closed-message')) {
         $vote = 0;
         $flag = 0;
         foreach ($this->comment_votes as $vote) {
             if ($vote['postid'] == $c_item['raw']['postid']) {
                 $vote = (int) $vote['vote'];
                 break;
             }
         }
         $netvotes = $c_item['raw']['netvotes'] != 0 ? $c_item['raw']['netvotes'] : '';
         if (qa_permit_check('permit_vote_c')) {
             $this->output('<table class="comment-votable-container"><tr><td class="comment-vote-container">');
             switch ($vote) {
                 case 1:
                     $up = 0;
                     $up_type = '-selected';
                     $down_type = false;
                     break;
                 case -1:
                     $down = 0;
                     $down_type = '-selected';
                     $up_type = false;
                     break;
                 default:
                     $up = 1;
                     $down = -1;
                     $up_type = '';
                     $down_type = '';
                     break;
             }
             if (!qa_opt('voting_down_cs') && $vote != -1) {
                 $down_type = false;
             }
             // don't allow for own user
             if ($c_item['raw']['userid'] != qa_get_logged_in_userid()) {
                 $this->output(($up_type !== false ? '<div class="comment-vote-item' . $up_type . '" name="vote_' . $c_item['raw']['postid'] . '_' . $up . '_c' . $c_item['raw']['postid'] . '_1" onclick="ajaxCommentVote(this);" title="' . qa_lang_html('main/vote' . ($up == 0 ? 'd' : '') . '_up_popup') . '">▲</div>' : '') . ($netvotes ? '<div id="voting_' . $c_item['raw']['postid'] . '">' . $netvotes . '</div>' : '') . ($down_type !== false ? '<div class="comment-vote-item' . $down_type . '" onclick="ajaxCommentVote(this);" name="vote_' . $c_item['raw']['postid'] . '_' . $down . '_c' . $c_item['raw']['postid'] . '_-1" title="' . qa_lang_html('main/vote' . ($down == 0 ? 'd' : '') . '_down_popup') . '">▼</div>' : ''));
             } else {
                 if ($netvotes) {
                     $this->output('<div id="voting_' . $c_item['raw']['postid'] . '">' . $netvotes . '</div>');
                 }
             }
             $this->output('</td><td>');
             qa_html_theme_base::c_item_main($c_item);
             $this->output('</td></tr></table>');
         } else {
             if ($netvotes) {
                 $this->output('<table class="comment-votable-container"><tr><td class="comment-vote-container"><div id="voting_' . $c_item['raw']['postid'] . '">' . $netvotes . '</div></td><td>');
                 qa_html_theme_base::c_item_main($c_item);
                 $this->output('</td></tr></table>');
             } else {
                 qa_html_theme_base::c_item_main($c_item);
             }
         }
     } else {
         qa_html_theme_base::c_item_main($c_item);
     }
 }
开发者ID:neil-zeng,项目名称:q2a-comment-voting,代码行数:60,代码来源:qa-comment-voting-layer.php


注:本文中的qa_html_theme_base::c_item_main方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。