get_results("SELECT * FROM $wpdb->comments WHERE comment_post_ID = '$id' AND comment_approved = '1' ORDER BY comment_date"); $comments = array_slice($comments, $start, $number); $GLOBALS['comments_reply'] = array(); function write_comment(&$c, $deep_id = -1, $color = true) { global $max_level; $comments_reply = $GLOBALS['comments_reply']; if ($c->comment_author_email== get_the_author_email()) $style = ' class="mine"'; else if ($color==true){$style=' class="borderc1"';$color=!$color;} else{$style=' class="borderc2"';$color=!$color;} ?>
  • >
    At comment_date);?>, said:
    ID) || ($GLOBALS['cmtDepth'] < $max_level)) echo '['; // delete link if (user_can_edit_post_comments($user_ID, $post->ID)) { $deleteurl = get_bloginfo("siteurl") . '/wp-admin/comment.php?action=deletecomment&p=' . $c->comment_post_ID . '&c=' . $c->comment_ID; $deleteurl = wp_nonce_url($deleteurl, 'delete-comment_'.$c->comment_ID); echo "delete|"; $spamurl = get_bloginfo("siteurl") . '/wp-admin/comment.php?action=deletecomment&dt=spam&p=' . $c->comment_post_ID . '&c=' . $c->comment_ID; $spamurl = wp_nonce_url($spamurl, 'delete-comment_'.$c->comment_ID); echo "spam|"; edit_comment_link('Edit', '',(($GLOBALS['cmtDepth'] < $max_level)?'|': '')); } if ($GLOBALS['cmtDepth'] < $max_level) { if ( get_option("comment_registration") && !$user_ID ) echo 'Log in to Reply ]'; else echo 'Reply'; } if (user_can_edit_post_comments($user_ID, $post->ID) || ($GLOBALS['cmtDepth'] < $max_level)) echo ']
    '; if ($comments_reply[$c->comment_ID]) { $id = $c->comment_ID; if($GLOBALS['cmtDepth'] < $max_level ) echo ''; } echo '
  • '; } ?> comment_ID][] = $c; if (isset($GLOBALS['comments_reply'][$c->comment_reply_ID])) $GLOBALS['comments_reply'][$c->comment_reply_ID][] = $c; else $GLOBALS['comments_reply'][0][] = $c; } $GLOBALS['cmtDepth'] = 0;$color=true; foreach($GLOBALS['comments_reply'][0] as $cmt) { $GLOBALS['comment'] = &$cmt; write_comment($GLOBALS['comment'], '-1', $color); $color=!$color; } else: endif; ?>