Recent Comments

Purpose

This plugin displays a list of the most recent comments to your blog in a highly customisable way.

This is version 2.6.2.1 download latest version. It is compatible with WordPress 1.5–2.6.2.

Please note the new upgrade instructions!

The plugin has an settings page which lets you change how the output is generated and displayed.

Installation Instructions

  1. If upgrading from a previous version, first deactivate the plugin via the Plugins page and delete the plugin folder from your server.
  2. Upload the plugin folder to your /wp-content/plugins/ directory. You will also need to install the Post-Plugin Library.
  3. Go to your admin Plugins page and activate Recent Comments.
  4. Put <?php recent_comments(); ?> at the place in your theme files where you want the list of similar posts to appear. Lorelle on WordPress has a good guide to modifying themes for plugins. If you are using a widget-ready theme the plugin can be placed from the widget admin page.
  5. Use the admin Options|Recent Comments page to set all the available options. Alternatively, the options can be overridden by passing a parameter to the recent_comments template tag.

Usage and Options

The configuration page will help you to set up the plugin to your satisfaction.

If you also install the latest version of Plugin Output Cache the output of this plugin will be automatically cached for efficiency.

Finally…

I look forward to your help in ironing out any issues and implementing any good ideas. The plugin settings page has an option to submit bug reports but general comments can be left below.

Frequently Asked Questions

  1. Is there a way to get output like '{commentauthor : snippetcharacterlink}' but with the whole thing as a link?

    You can build the output template any way you like using the tags as basic blocks with html and ordinary text as 'glue'. In this case you could try:

  2. {commenter}: {commentsnippet:30} ...
  3. .
    It's a very flexible system and you can even extend it by creating new output tags.

  • I wonder is it possible to display recent comments horizontally instead of the standard column fashion?

    This applies to the output from the other post plugins too: the output is just a list and you can use CSS to style your list items to either display:inline or float:left. CSS gives you many possibilities.

    1. How do I get it so that {link} displays the date instead of the title? If i use the {date} template tag, it shows the date but no link.

      You need to use the output template to tell the plugin exactly what to display. For example, if you want a link where the visible text shows the date of posting you could try:

      
      
    2. {date}
    3. How do I format the output of the {date} tag?

      The blog's date format is used by default but you can change it by adding a format string. The Codex has a page on format strings. Let's say you want the date to look like Sunday, January 14, 2007. The correct format string is 'l, F j, Y' so you would write

      {date:l, F j, Y}
    4. I don't want my post plugin widget to show on the main page, just the single post page. Is that possible?

      Yes. The widgets now let you choose the condition under which they are visible. The condition can be set using any combination of WordPress Conditional Tags, e.g., 'is_home()', 'is_category()', or 'is_page()'.

      In this case the right condition is 'is_single()'.

    5. I'm trying to place the plugin output just after a single post but other plugins seem to get in there first. Any ideas?

      Some plugins automatically tack on their output to the end of a post's content. The only way to get something in between is to hope that those plugins offer a way to turn off that kind of behaviour and let you explicitly place their output with a template tag. The good news is that most plugins are cooperative.

    6. I found a script that allows me to put thumbnail images [or anything else] with each post. I was wondering if there was a way to integrate that with this plugin?

      If the script stores the thumbnails in a custom field you can use the output template tag {custom} to display them. Try
      something like:

      
      {custom:thumbnail-alt}
      

      A similar thing can be done with many other plugins.

    7. I want to show the same plugin in two different places but with different output: can I?

      Yes. Decide on one of the output templates and other settings you need and set them up from the options pages. The other invocation of the plugin then gets called with passed parameters to get the different output.
      e.g., random_posts('limit=3&output_template={custom:another_field}')

    8. I want an output template tag to do xxxxxx. How do I invent one?

      You have two choices: a) modify the output_tags.php in the post-plugin-library; b) use the {php} tag.
      If you go down route (a) (which is actually very easy) please let me know the new tag and I'll maybe include it in the next version. If you use the {php} tag do be careful not to start WWIII.

    9. I uninstalled one of your plugins and now my whole sidebar has disappeared. How do I get it back?

      You have probably forgotten to remove the code calling the plugin, e.g., recent_posts();.
      I find a good practice is to use something like:

      
      if (function_exists('recent_posts')) {
        recent_posts();
      }
      

      That way, if I ever deactivate a plugin temporarily the website doesn't fall apart.

    211 Comments Add your own

    Leave a Comment

    Required

    Required, hidden

    Trackback this post  |  Subscribe to the comments via RSS Feed