', $after = '', $exclude_emails = '') { global $wpdb, $tablecomments; if (!isset($tablecomments)) $tableoptions = $wpdb->comments; $request = "SELECT DISTINCT comment_author, comment_author_url, comment_author_email FROM $tablecomments WHERE comment_approved = '1'"; if ($exclude_emails != '') { $exclude_email_array = explode(' ',$exclude_emails); for ($i = 0; $i < count($exclude_email_array); $i++) { $request .= " AND comment_author_email <> '".$exclude_email_array[$i]."'"; } } $request .= " ORDER BY comment_ID DESC LIMIT $no_commenters"; $comments = $wpdb->get_results($request); $output = ''; if ($comments) { foreach ($comments as $comment) { $comment_author = stripslashes($comment->comment_author); $comment_author_url = $comment->comment_author_url; $output .= $before . '' . $comment_author . ''; $requestTotalComments = "SELECT COUNT(comment_ID) FROM $tablecomments WHERE comment_author = '".$comment->comment_author."' AND comment_author_url = '".$comment->comment_author_url."' AND comment_author_email = '".$comment->comment_author_email."'"; $totalComments = $wpdb->get_var($requestTotalComments); $output .= " (".$totalComments.")"; $output .= $after; } echo $output; } } function get_recent_commented_on ($no_posts = 5, $before = '