diff --git a/wp-commentsrss2.php b/wp-commentsrss2.php index 59866d006c..82f18041d3 100644 --- a/wp-commentsrss2.php +++ b/wp-commentsrss2.php @@ -1,26 +1,15 @@ "; +echo ''; ?> <?php if (isset($_REQUEST["p"]) || isset($_REQUEST["name"])) { echo "Comments on: "; the_title_rss(); } else { bloginfo_rss("name"); echo " Comments"; } ?> - + - - - Copyright - - - - hourly - 1 - 2000-01-01T12:00+00:00 + + + http://wordpress.org/?v= get_results("SELECT comment_ID, - comment_author, - comment_author_email, - comment_author_url, - comment_date, - comment_content, - comment_post_ID, - $tableposts.ID, - $tableposts.post_password - FROM $tablecomments - LEFT JOIN $tableposts ON comment_post_id = id - WHERE comment_post_ID = '$id' - AND $tablecomments.comment_approved = '1' - AND $tableposts.post_status = 'publish' - AND post_date < '".date("Y-m-d H:i:s")."' - ORDER BY comment_date - LIMIT $posts_per_rss"); - } - else { // if no post id passed in, we'll just ue the last 10 comments. - $comments = $wpdb->get_results("SELECT comment_ID, - comment_author, - comment_author_email, - comment_author_url, - comment_date, - comment_content, - comment_post_ID, - $tableposts.ID, - $tableposts.post_password - FROM $tablecomments - LEFT JOIN $tableposts ON comment_post_id = id - WHERE $tableposts.post_status = 'publish' - AND $tablecomments.comment_approved = '1' - AND post_date < '".date("Y-m-d H:i:s")."' - ORDER BY comment_date DESC - LIMIT $posts_per_rss"); + $comments = $wpdb->get_results("SELECT comment_ID, comment_author, comment_author_email, + comment_author_url, comment_date, comment_content, comment_post_ID, + $tableposts.ID, $tableposts.post_password FROM $tablecomments + LEFT JOIN $tableposts ON comment_post_id = id WHERE comment_post_ID = '$id' + AND $tablecomments.comment_approved = '1' AND $tableposts.post_status = 'publish' + AND post_date < '".date("Y-m-d H:i:s")."' + ORDER BY comment_date LIMIT $posts_per_rss"); + } else { // if no post id passed in, we'll just ue the last 10 comments. + $comments = $wpdb->get_results("SELECT comment_ID, comment_author, comment_author_email, + comment_author_url, comment_date, comment_content, comment_post_ID, + $tableposts.ID, $tableposts.post_password FROM $tablecomments + LEFT JOIN $tableposts ON comment_post_id = id WHERE $tableposts.post_status = 'publish' + AND $tablecomments.comment_approved = '1' AND post_date < '".date("Y-m-d H:i:s")."' + ORDER BY comment_date DESC LIMIT $posts_per_rss"); } // this line is WordPress' motor, do not delete it. if ($comments) { foreach ($comments as $comment) { ?> - + by: <?php comment_author_rss() ?> - + comment_post_ID; ?>@ post_password) && $HTTP_COOKIE_VARS['wp-postpass'] != $comment->post_password) { @@ -95,12 +57,13 @@ foreach ($posts as $post) { start_wp(); Protected Comments: Please enter your password to view comments. ]]> ]]> - + - \ No newline at end of file +