This plugin will add a list of the most recent comments posted to your blog. They are gathered in descending order (newest at the top), but then grouped by post title, so that comments from the same post are listed together. The list items will be links to the comments, and will contain the name of the commenter.
The following parameters are configurable by the user, either from the widget admin interface or directly (if used as a standalone plugin):
- Number of comments to show: Total number of comments to display
- Number of words per comment excerpt: The first N words of the comment will be listed
- Max comments per post: This option is a “cap” to ensure that multiple posts are included in the list, even if all the recent comments were from a single post.
- Max letters per word: This option is to deal with long “words” in the comments (specifically raw URLs) that can interfere with the formating of the list, depending on the CSS rules applied.
Download FreePress Recent Comments Widget
Installation:
- Extract all files in the archive into your plugins directory. The archive should contain a folder called “freepress”, which should be placed directly under the plugins directory, and all the files distributed with this plugin should be in the “freepress” folder. For example:
/var/www/wordpress/wp-content/plugins/freepress/recentCommentsWidget.php - If you are using the widgets plugin, the tagboard will automatically appear as an available widget for your sidebar.
- If you prefer to manually add the tagboard to your theme, you can insert the following code wherever you’d like the tagboard to show up:
<?php
if(function_exists('fp_get_recent_comments')) {
echo fp_get_recent_comments(7, 5, 5, 0);
}
?>
The arguments are in the order described in the list above. In this example, it would show 7 comments total, 5 words from each comment as an excerpt, a maximum of 5 comments from any one post, and no limit on the number of characters per word in the excerpts.
*Note: This version of the plugin has been tested in WordPress 2.x as well as recent versions of WordPress MU. Please let me know by commenting here if you run into any issues.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
Sure; if you see any reference sites that you like the look of you can always view the CSS for those.
Here is what I use for how it looks on my site:
li.widget_fp_recentcomments div.recentcommentscontainer {display: block;
color: #191736;
background-color: #FFF0BD;
border: #191736 1px dashed;
overflow: hidden;
padding: 0px 5px !important;
}
li.widget_fp_recentcomments h2.widgettitle {
font-size: 1.6em !important;
font-weight: bold;
font-family: georgia, times new roman,serif;
color: white;
margin: 0px 0px 5px 0px;
}
li.widget_fp_recentcomments div.recentcommentscontainer h4.recentCommentsPostTitle {
margin: 2px 0px 2px 0px;
color: #191736;
font-size: 1em;
font-weight: bold;
}
li.widget_fp_recentcomments div.recentcommentscontainer h4 a:hover { color:#191736 !important; }
li.widget_fp_recentcomments div.recentcommentscontainer ul {
display: block;
margin: 0px 0px 5px 0px !important;
padding: 0px 0px 5px 0px !important;
color: #191736;
font-size: .85em !important;
text-decoration: none;
font-weight: normal !important;
border-bottom: #AFA37C 1px dashed;
}
li.widget_fp_recentcomments div.recentcommentscontainer ul li {
margin: 2px 0px;
}
li.widget_fp_recentcomments div.recentcommentscontainer ul li span.commentAuthor{
font-weight: bold;
}
li.widget_fp_recentcomments div.recentcommentscontainer ul li a:hover {
color: #191736 !important;
font-weight: normal !important;
}
Is there any way to exclude pingbacks from the list of recent comments displayed?
can`t work in wordpress2.1
I love this plugin. But would like to have the updated version for wordpress2.1
Love this but is not working in WP2.1. Any possibility of an update?
KA
When was the last time you downloaded it? I did recently publish an update, and it’s running on this blog, which is WP 2.1.
Is the link above broken for anyone else?
Oops, should be working now.
No the file is corrupted.
No, it’s good. Are you maybe trying to open it as a .zip file rather than .tar.gz?
Perhaps I should just post it in .zip format to make it easier for more people…
nice blog. i will certainly book mark it. i also have a web site.
it is
http://nbbhost.uni.cc
Regards
Hi -
Would it be possible to post this as a zip file as you tentatively suggested above?? It is exactly what I’ve been looking for, but I’m afraid I’m not making any headway trying to figure out how to extract files from a .tar.gz ….
Thanks!!!! – julie
not working for me….when i download it all i get is the php file for the widget no other files as suggested by the instructions….is there a link to download the plugin or just the widget???
The .php file is the only file you need. If you’re using the widgets plugin already (by Automattic) then this plugin should be available in your list of widgets after you activate it.
If you aren’t using the widgets plugin, see the directions above for using it on its own.
I’m trying to use it on its own…I’ve activated the pluggin and pasted this code in my sidebar:
but that code is all that shows up…must be missing something
pluggin doesn’t work…just shows code..i’ve enabled the plugin and added the required code and all it shows is that code…what is the problem?????????????????????????????/
Make sure that the opening PHP tag does not contain a space between the < and the ? as was shown in the example. That was an error in the original post.
Thanx for this plugin;)
How can I display comment author’s name with the link to their website, not just plain text?
Right now it will only show links for registered users, not anonymous commenters.
I plan to release a new version shortly that does offer that option, but I’d caution against using it due to the potential for abuse.
tnks you
very very good
happy christmas
I have been looking for this plugin – thank you