comments
LEFT OUTER JOIN $wpdb->posts ON ($wpdb->comments.comment_post_ID = $wpdb->posts.ID)
WHERE comment_approved = '1' AND comment_type = '' AND post_password = ''
ORDER BY comment_date_gmt DESC
LIMIT $bfa_rc_src_count";
$comments = $wpdb->get_results($sql);
// Generate the output string, prepend and append the HTML specified
$output = $bfa_rc_pre_HTML;
$output .= "\n
";
if (!empty($comments)) {
foreach ($comments as $comment) {
// Make a check if we need to print out '...' after the selected
// comment text. This needs to be done if the text is longer than
// the specified length.
$dots = '';
# if ( $bfa_rc_src_length <= strlen(strip_tags($comment->com_excerpt)) ) $dots = "...";
if ($limit_by == "letters") {
if ( $bfa_rc_src_length <= strlen(strip_tags($comment->comment_content)) ) {$dots = "...";}
}
elseif ($limit_by == "words") {
if ( $bfa_rc_src_length <= count(explode(" ", strip_tags($comment->comment_content))) ) {$dots = "...";}
}
// different comment link for WP 2.7 and newer / WP 2.6 and older
if (function_exists('wp_list_comments')) { $comment_link = get_comment_link($comment->comment_ID); } else {
$comment_link = get_permalink($comment->ID) . "#comment-" . $comment->comment_ID; }
$post_link = get_permalink($comment->ID);
$author_link = $comment->comment_author_url;
if ($author_nofollow == "on") {$author_link = $author_link . '" rel="nofollow'; }
if ($point_first_link == "comment") {$first_link = $comment_link; }
elseif ($point_first_link == "post") {$first_link = $post_link; }
elseif ($point_first_link == "author") {$first_link = $author_link; }
if ($point_second_link == "comment") {$second_link = $comment_link; }
elseif ($point_second_link == "post") {$second_link = $post_link; }
elseif ($point_second_link == "author") {$second_link = $author_link; }
$comment_text = strip_tags($comment->com_excerpt);
if ($add_dots == "on") {$comment_text = $comment_text . $dots; }
if ($comment_bold == "on") {$comment_text2 = "$comment_text"; } else {$comment_text2 = $comment_text; }
if ($comment_em == "on") {$comment_text2 = "$comment_text2"; }
$post_text = apply_filters('the_title_rss', $comment->post_title);
if ($post_bold == "on") {$post_text2 = "$post_text"; } else {$post_text2 = $post_text; }
if ($post_em == "on") {$post_text2 = "$post_text2"; }
$author_text = $comment->comment_author;
if ($author_bold == "on") {$author_text2 = "$author_text"; } else {$author_text2 = $author_text; }
if ($author_em == "on") {$author_text2 = "$author_text2"; }
$output .= "\n\t