function mytheme_comment($comment, $args, $depth) { $GLOBALS['comment'] = $comment; ?> <li> <div class="comment-listInfo"><?php printf(__('<span>%s</span>'), get_comment_author_link()); printf(__('<span>%s</span>'), get_comment_author_ip()); printf(__('<span>%s</span>'), comment_time()); ?> </div> <p><?php comment_text(); ?> </p> </li> <?php }
function fun_comment_quote($comment, $args, $depth) { $GLOBALS['comment'] = $comment; global $commentcount_quote, $wpdb, $post; if (!$commentcount_quote) { $cnt = $wpdb->get_var("SELECT COUNT(comment_ID) FROM {$wpdb->comments} WHERE comment_post_ID = {$post->ID} AND (comment_type = 'trackback' OR comment_type = 'pingback') AND comment_approved = '1' AND !comment_parent"); $page = get_query_var('cpage'); $cpp = get_option('comments_per_page'); if (ceil($cnt / $cpp) == 1 || $page > 1 && $page == ceil($cnt / $cpp)) { $commentcount_quote = $cnt + 1; } else { $commentcount_quote = $cpp * $page + 1; } } ?> <li <?php comment_class(); ?> id="comment-<?php comment_ID(); ?> "> <div id="div-comment-<?php comment_ID(); ?> " class="comment-body"> <?php $add_below = 'div-comment'; ?> <div class="comment-author"><?php $uid = get_user_by_email($comment->comment_author_email)->ID; echo fun_get_avatar($uid, 40, fun_get_avatar_type($uid)); ?> <div style="float:right"> <span class="datetime"> <?php comment_date('Y-m-d'); comment_time(); ?> </span> </div> <span class="comment_author_link"><?php if ($comment->user_id != 0) { echo '<a href="' . get_author_posts_url($comment->user_id) . '" class="name">' . $comment->comment_author . '</a>'; } else { comment_author_link(); } ?> </span><span class="comment_author_ip"><?php _e('[ 来自 ', 'tinection'); ?> <span><?php echo convertip(get_comment_author_ip()); ?> </span> ] </span> </div> <?php if ($comment->comment_approved == '0') { ?> <span style="color:#C00; font-style:inherit; margin-top:5px; line-height:25px;"><?php $cpid = $comment->comment_parent; if ($cpid != 0) { echo '@'; } comment_author_link($cpid); _e('您的评论正在等待审核中...', 'tinection'); ?> </span> <br /> <?php } ?> <?php if ($comment->comment_approved == '1') { ?> <?php comment_text(); ?> <?php } ?> </div> <div class="clear"></div> <?php }