[wp-cvs] wordpress wp-commentsrss2.php,1.25,1.26

Ryan Boren rboren at users.sourceforge.net
Fri Feb 11 01:09:36 GMT 2005


Update of /cvsroot/cafelog/wordpress
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14552

Modified Files:
	wp-commentsrss2.php 
Log Message:
Allow comments feeds for pages. Use new post loop. http://mosquito.wordpress.org/view.php?id=846

Index: wp-commentsrss2.php
===================================================================
RCS file: /cvsroot/cafelog/wordpress/wp-commentsrss2.php,v
retrieving revision 1.25
retrieving revision 1.26
diff -C2 -d -r1.25 -r1.26
*** wp-commentsrss2.php	11 Feb 2005 01:07:42 -0000	1.25
--- wp-commentsrss2.php	11 Feb 2005 01:09:34 -0000	1.26
***************
*** 15,23 ****
  <?php
  $i = 0;
! if ($posts) { foreach ($posts as $post) { start_wp();
  	if ($i < 1) {
  		$i++;
  ?>
! 	<title><?php if (is_single()) { echo "Comments on: "; the_title_rss(); } else { bloginfo_rss("name"); echo " Comments"; } ?></title>
  	<link><?php (is_single()) ? permalink_single_rss() : bloginfo_rss("url") ?></link>
  	<description><?php bloginfo_rss("description") ?></description>
--- 15,24 ----
  <?php
  $i = 0;
! if (have_posts()) :
!   while (have_posts()) : the_post();
  	if ($i < 1) {
  		$i++;
  ?>
! 	<title><?php if (is_single() || is_page()) { echo "Comments on: "; the_title_rss(); } else { bloginfo_rss("name"); echo " Comments"; } ?></title>
  	<link><?php (is_single()) ? permalink_single_rss() : bloginfo_rss("url") ?></link>
  	<description><?php bloginfo_rss("description") ?></description>
***************
*** 26,30 ****
  
  <?php 
! 	  if (is_single()) {
  			$comments = $wpdb->get_results("SELECT comment_ID, comment_author, comment_author_email, 
  			comment_author_url, comment_date, comment_content, comment_post_ID, 
--- 27,31 ----
  
  <?php 
! 		if (is_single() || is_page()) {
  			$comments = $wpdb->get_results("SELECT comment_ID, comment_author, comment_author_email, 
  			comment_author_url, comment_date, comment_content, comment_post_ID, 
***************
*** 69,73 ****
  		}
  	}
! } }
  ?>
  </channel>
--- 70,74 ----
  		}
  	}
! endwhile; endif;
  ?>
  </channel>



More information about the cvs mailing list