[wp-hackers] RSS for Awaiting Moderation

Josh Jarmin fuegodesigns at gmail.com
Fri Nov 5 16:27:37 UTC 2004


Thanks, it works great with 1.3!  That is good work.


On Thu, 4 Nov 2004 20:03:12 -0700, Alex King <alex at alexking.org> wrote:
> Ok, completely untested:
> 
> 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,
>         $wpdb->posts.ID, $wpdb->posts.post_password FROM $wpdb->comments
>         LEFT JOIN $wpdb->posts ON comment_post_id = id WHERE comment_post_ID =
> '$id'
>         AND $wpdb->comments.comment_approved = '1' AND
> $wpdb->posts.post_status = 'publish'
>         AND post_date < '".date("Y-m-d H:i:59")."'
>         ORDER BY comment_date LIMIT " . get_settings('posts_per_rss') );
> } else if (isset($_GET["view"]) && $_GET["view"] ==
> 'moderated_comments') {
>         $comments = $wpdb->get_results("SELECT comment_ID, comment_author,
> comment_author_email,
>         comment_author_url, comment_date, comment_content, comment_post_ID,
>         $wpdb->posts.ID, $wpdb->posts.post_password FROM $wpdb->comments
>         LEFT JOIN $wpdb->posts ON comment_post_id = id WHERE
> $wpdb->comments.comment_approved = '0'
>         AND $wpdb->posts.post_status = 'publish' AND post_date <
> '".date("Y-m-d H:i:59")."'
>         ORDER BY comment_date LIMIT " . get_settings('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,
>         $wpdb->posts.ID, $wpdb->posts.post_password FROM $wpdb->comments
>         LEFT JOIN $wpdb->posts ON comment_post_id = id WHERE
> $wpdb->posts.post_status = 'publish'
>         AND $wpdb->comments.comment_approved = '1' AND post_date <
> '".date("Y-m-d H:i:s")."'
>         ORDER BY comment_date DESC LIMIT " . get_settings('posts_per_rss') );
> }
> 
> Find the SQL queries in wp-commentsrss2.php and replace with this code.
> Then subscribe to:
> 
> http://www.example./com/wp-commentsrss2.php?view=moderated_comments
> 
> This is from a recent nightly build, it will be slightly different in
> 1.2.1 or previous versions.
> 
> Cheers,
> 
> 
> --Alex
> 
> http://www.alexking.org/
> 
> On Nov 4, 2004, at 7:21 PM, Josh Jarmin wrote:
> 
> > Thanks Alex.  So my next question is... would anyone be willing to
> > take on this little project.  I'm sure other people would be
> > interested in it as well.  I dont know enough about php or rss to
> > complete this project.
> >
> >
> > On Thu, 4 Nov 2004 17:48:26 -0700, Alex King <alex at alexking.org> wrote:
> >> Should be easy to hack into the comments RSS feed. It would nicely
> >> circumvent the problem of your e-mail spam filters protecting you from
> >> notifications about blog spam too. :)
> >>
> >> --Alex
> >>
> >> http://www.alexking.org/
> >>
> >>
> >> On Nov 4, 2004, at 5:23 PM, Josh Jarmin wrote:
> >>
> >>> Is there a way to have RSS for the Awaiting Moderation page in WP?  I
> >>> use an RSS reader for Firefox called Sage and I would like to be able
> >>> to quickly find out if anything is waiting for me to moderate without
> >>> having to check the page every day.  I dont use the email thing,
> >>> because of all the spam that needs to be moderated and I dont want to
> >>> fill up my email box as well with comment spam.
> >>
> >>
> >> _______________________________________________
> >> hackers mailing list
> >> hackers at wordpress.org
> >> http://wordpress.org/mailman/listinfo/hackers_wordpress.org
> >>
> >
> >
> > --
> > Thanks,
> > Josh Jarmin
> > FuegoDesigns.com
> > Radiantrock.com
> > Perfection Is Boring - http://www.radiantrock.com/blog
> >
> > _______________________________________________
> > hackers mailing list
> > hackers at wordpress.org
> > http://wordpress.org/mailman/listinfo/hackers_wordpress.org
> 
> 
> _______________________________________________
> 
> 
> hackers mailing list
> hackers at wordpress.org
> http://wordpress.org/mailman/listinfo/hackers_wordpress.org
> 


-- 
Thanks,
Josh Jarmin
FuegoDesigns.com
Radiantrock.com
Perfection Is Boring - http://www.radiantrock.com/blog



More information about the hackers mailing list