Retrieve the last N people who have most recently commented. Note this is different than saying “the people who made the N most recent comments.”
This entry was posted
on Wednesday, July 7th, 2004 at 7:26 AM and is filed under Package/plugin/module, WordPress.
You can follow any responses to this entry through the RSS 2.0 feed.
You can leave a response, or trackback from your own site.
Any chance I can nest this within the Recently Commented function? I am trying to replicate what I did here in MT. It shows the ten most recently commented-on posts and the three most recent authors and times of the comment.
Thanks for your hard work. These are awesome plug-ins!
Yours was a little more complex to implement than Icyshard’s request, but I think I did it. Go here and refer to the second function on that page, sample2_recently_commented(). Theoretically, you’d just have to do:
<?php sample2_recently_commented(); ?>
and you’d get what you currently have under MT. Like I said for Icyshard, you can paste that function into your copy of recently_commented.php, or into the myhacks.php file (you’ll have to find help on using that file yourself). Hope it helps!
Thank you, Scott! You are officially my favorite plug-in author!!!
OK, something weird: somehow sample2_recently_comment is calling get_recently_commented within it. Have a look and you’ll see: WP.OrangePolitics.org.
I’ve added some text to show where it is in the script.
Hmmm, can you verify that in your sample2_recently_commented() function, that the call to get_recently_commented() (a call which is necessary) does NOT have ANY spaces between the pair of single-quote characters in the second and third argument to the function. Should be like:
get_recently_commented($num_posts, '', '')
If the second and third arguments are ” (a pair of single-quotes without a space in between), get_recently_commented() is not supposed to echo/display the basic formatting. So I’d like to rule out the simple stuff. It ran fine for me on a test blog.
Yep, I pasted it directly from your instructions. Here’s what the whole line looks like:
Sorry to be such a pain in your ass, but I think I fixed it! I had a bunch of configurations in the get_recent_commenters from when I was messing with that. I cleared those out and now it looks good.
Thanks again, and sorry again! Keep the great plug-ins coming…
Sorry to keep borthing you, Scott. I have a small problem, my recent comments list is showing comments that haven’t been approved yet! Is there a setting I can toggle in your script to only display approved comments?
As always, thanks for your amazing work!
Eww, what’s “borthing?” I mean to say “bothering.” :}
Ruby,
Revisit the page where I posted your customized code (linked via the second comment in this post). I’ve updated it to omit unapproved comments. The updated line of code, reproduced below, was given this new bit:
comment_approved = '1' AND[…] UPDATE There’s been a bit of debate about the need for a central database of plugins. There’s a lot of developers now developing plugins, and it’s quite a task to find them as a user, as well as a developer to see if something you want to do has already been done. In any case - this plugin has apparently already been done by coffee2code.com (with only some minimal differences). […]