function gorod_comment($comment, $args, $depth) { $GLOBALS['comment'] = $comment; ?> <li <?php comment_class(); ?> id="li-comment-<?php comment_ID(); ?> "> <div id="comment-<?php comment_ID(); ?> "> <div class="comment-author-conteiner vcard"> <span class="comment-author"><?php echo get_comment_author(); ?> </span> <span class="comment-date"><?php echo get_date_formatted(get_comment_date('d.m.Y') . "." . get_comment_time('H.i'), 'v'); ?> </span> <span class="reply"> <?php comment_reply_link(array_merge($args, array('depth' => $depth, 'reply_text' => 'Ответить', 'max_depth' => $args['max_depth']))); ?> </span> <span class="karma"><?php if (function_exists(ckrating_display_karma)) { ckrating_display_karma(); } ?> </span> </div> <?php if ($comment->comment_approved == '0') { ?> <em><?php _e('Your comment is awaiting moderation.'); ?> </em> <?php } ?> <div class="comment-content"><?php comment_text(); ?> </div> </div> </li> <?php }
function danhuaer_comment($comment, $args, $depth) { $GLOBALS['comment'] = $comment; preg_match_all('/\\[img=?\\]*(.*?)(\\[\\/img)?\\]/e', $comment->comment_content, $matches); $sum = count($matches[1]); if ($sum > 0) { $comment_pic = $matches[1][0]; } //读取评论文字内容,过滤代码和图片 $comment_content = trim(strip_tags(apply_filters('comment_text', $comment->comment_content))); $comment_excerpt = '【' . get_the_title() . '】 @' . get_comment_author() . ':' . urlencode($comment_content); $comment_title = get_the_excerpt(); switch ($comment->comment_type) { case '': ?> <li <?php comment_class('comment-item'); ?> id="li-comment-<?php comment_ID(); ?> "> <div id="comment-<?php comment_ID(); ?> " class="comment-pspan"> <div class="comment-author vcard commenter"> <div class="comment-meta commentmetadata"> <div class="share_up left"> <a rel="nofollow" href="http://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?url=<?php echo urlencode(esc_url(get_permalink())); ?> &pics=<?php if (is_page()) { echo urlencode($comment_pic); } else { echo p2_catch_that_image(); } ?> &title=<?php echo urlencode($comment_title); ?> &summary=<?php echo '@' . get_comment_author() . ':' . urlencode($comment_content); ?> " title="转发到QQ空间" target="_blank"><span alt="转发到QQ空间" class="cs_qzone comment_social"></span></a> <a rel="nofollow" href="http://v.t.qq.com/share/share.php?appkey=801069107&title=<?php echo $comment_excerpt; ?> &pic=<?php if (is_page()) { echo urlencode($comment_pic); } else { echo p2_catch_that_image(); } ?> &url=<?php echo urlencode(esc_url(get_permalink())); ?> " title="转贴到腾讯微博" target="_blank"><span alt="腾讯微博" class="cs_qq comment_social"></span></a> <a rel="nofollow" href="http://service.weibo.com/share/share.php?appkey=1767202731&title=<?php echo $comment_excerpt; ?> &pic=<?php if (is_page()) { echo urlencode($comment_pic); } else { echo p2_catch_that_image(); } ?> &url=<?php echo urlencode(esc_url(get_permalink())); ?> " title="转发到新浪微博" target="_blank"><span alt="转发到新浪微博" class="cs_sina comment_social"></span></a> </div><!-- .share_up --> <div class="reply_up left"> <?php edit_comment_link('<span class="cs_edit comment_social"></span>'); comment_reply_link(array_merge((array) $args, array('reply_text' => '<span title="评论" class="cs_reply comment_social"></span>', 'depth' => $depth, 'max_depth' => $args['max_depth']))); ?> </div><!-- .share_up --> </div><!-- .comment-meta .commentmetadata --> <?php echo get_avatar($comment, 50); ?> <?php printf(__('%s', 'danhuaer'), sprintf('<cite class="fn">%s</cite>', get_comment_author_link())); ?> <div class="comment-body"><?php comment_text(); ?> </div> </div><!-- .comment-author .vcard --> <?php if ($comment->comment_approved == '0') { ?> <em class="comment-awaiting-moderation"><?php _e('Your comment is awaiting moderation.', 'danhuaer'); ?> </em> <br /> <?php } ?> <div class="vote"> <span class="actions" ><?php if (function_exists(ckrating_display_karma)) { ckrating_display_karma(); } ?> </span> </div><!-- .reply --> </div><!-- #comment-## --> <?php break; case 'pingback': case 'trackback': ?> <li class="post pingback"> <p><?php _e('Pingback:', 'danhuaer'); ?> <?php comment_author_link(); edit_comment_link(__('(Edit)', 'danhuaer'), ' '); ?> </p> <?php break; } }
function ludumtheme_comment($comment, $args, $depth) { $GLOBALS['comment'] = $comment; ?> <li <?php comment_class(); ?> id="li-comment-<?php comment_ID(); ?> "> <div id="comment-<?php comment_ID(); ?> "> <div class="comment-author vcard"> <?php echo get_avatar($comment, $size = '56', $default = ''); ?> <?php printf(__('<cite class="fn">%s</cite> <span class="says">says:</span>'), get_comment_author_link()); ?> </div> <?php if ($comment->comment_approved == '0') { ?> <em><?php _e('Your comment is awaiting moderation.'); ?> </em> <br /> <?php } ?> <div class="comment-meta commentmetadata"><a href="<?php echo htmlspecialchars(get_comment_link($comment->comment_ID)); ?> "><?php printf(__('%1$s at %2$s'), get_comment_date(), get_comment_time()); ?> </a><?php edit_comment_link(__('(Edit)'), ' ', ''); ?> </div> <?php comment_text(); ?> <!-- <div class="avatar"> <?php if (function_exists('ckrating_display_karma')) { ckrating_display_karma(); } ?> </div> --> <div class="reply"> <?php comment_reply_link(array_merge($args, array('depth' => $depth, 'max_depth' => $args['max_depth']))); ?> </div> </div> <?php }