本文整理汇总了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);
}
}
示例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);
}
}