Search
Code Directory
 ASP
 ASP.NET
 C/C++
 CFML
 CGI/PERL
 Delphi
 Development
 Flash
 HTML
 Java
 JavaScript
 Pascal
 PHP
 Python
 SQL
 Tools
 Visual Basic & VB.NET
 XML
New Code
ODBC Driver for NetSuite 1.2
Rapid CSS 2018 15.0
ByteScout PDF Extractor SDK 9.0.0.3079
TeeGrid for .NET 2018
HotelDruid 2.2.3
Metamill 8.2.2022
EXE Stealth Protector 4.23
EXE Bundle - The file joiner 3.14
WeBuilder 2018 15.0
SuiteCRM Customer Portal 1.0
Magento Admin Mobile App 1.0
AnyStock Stock and Financial JS Charts 8.2.0
Kijiji Script 1.0.3
SSIS Data Flow Components 1.7
ODBC Driver for Amazon Redshift 1.0
Top Code
ODBC Driver for NetSuite 1.2
Calculate PSD of a signal using Welch algorithm 1.0
PHP Image Resize Script 1.0
Restaurant Table Reservation System 1.0
Interfun Chat Server 1.0.26
Active noise control system using FxLMS algorithm 1.0
T-Shirt Designer Script 1.65
Issue Manager App 1.0
Circular convolution using DCT and DST 1.0
Simulink Support Package for Arduino Mega Hardware 1.0
Moon Position 1.0
Meeting Room Scheduler System 3.7.5
LAPJV - Jonker-Volgenant Algorithm for Linear Assignment Problem 1.0
EC HYIP 1.0
Resume Builder Script 1.0.4
Top Rated
Output Messenger 1.8.0
Aliexpress Clone- Ec21 Script 1
Indiegogo Clone 3.0
PHP Image Resize Script 1.0
Best Spotify Clone 1.0
Get Random Record Based on Weight 1.0.0
Travel Portal Script 9.29
Magento Product Designer 1.0
OFOS - Just Eat Clone Script 1.0
PrestaShop Upload Images Module 1.2.1
Trading Software 1.2.4
Deals and Discounts Website Script 1.0.2
Readymade MLM Products 2.01
ADO.NET Provider for ExactTarget 1.0
Solid File System OS edition 5.1
Recent Love - A List of Recent Comments 0.5
File ID: 103153






Recent Love - A List of Recent Comments 0.5
Download Recent Love - A List of Recent Comments 0.5http://wordpress.orgReport Error Link
License: Freeware
File Size: 20.5 KB
Downloads: 2
Submit Rating:
Recent Love - A List of Recent Comments 0.5 Description
Description: Displays a list (typically, in your sidebar) of your visitors' recent comments. By default, shows the latest comment from each of the last five commented-on posts.

You control:

* how many recent comments to display
* how many characters of the post title to display
* how to style each comment in the list (with open/close tags)
* whether to include or omit trackbacks/pingbacks
* whether to include or omit comments from the post's author
* a list of users for whom never to display comments (e.g., yourself; or use this to create a blacklist).

See "Installation" for easy setup instructions.
History

A few months ago, I wanted to display a list of recent comments in my blog's sidebar. After searching through the countless plugins which return lists of comments, I finally decided on Scott Reilly's Top/Recent Commenters plug-in.

Unfortunately, I had to tweak Scott's code to get it to work the way I wanted. One tweak led to another (you know how it is) until I finally just scrapped the original code and rolled my own. (You can see it in action on my blog's front page.)
What It Does

Adds a single template function:

rr_recent_comments (
$num_recent_posts = 5,
$before = '<li>',
$after = '</li>'
)

The function rr_recent_comments() returns a list of recent comments.

When invoked with no parameters, it returns a list containing the latest comment from each of the most recent 5 posts. Only one comment (the most recent one) per post is listed.

By default, any comments made by the author of the post are not included in the list. (This behaviour can be configurably modified.) Long post titles are truncated to a length which you can configure. Trackbacks and pingbacks are not included in the list by default.

You can exlcude certain posters, based on various criteria (author email, author name, etc.). This is helpful, for example, to exclude yourself from the list.

You can customize your list two ways: tag parameters and global config options.
Parameters

The function rr_recent_comments() takes three parameters, all of which are optional.

1. $num_recent_posts
The [maximum] number of comments to display.
Default: 5
2. $before
The text to display before each comment.
Default: '<li>'
3. $after
The text to display after each comment.
Default: '</li>'

Configuration Options

The behaviour of rr_recent_comments() can be customized on a global basis by editing some values in the plugin file, rr_recent_comments.php. With the possible exception of $max_title_length, most installations will probably not need to futz with these, but they're there if you want 'em.

*

$max_title_length (Default: 38) This value represents the longest length that a post title may be without it being truncated for display. Titles longer than this will be indiscriminately chopped, and an ellipses will be appended to them. Set to 0 to disable truncation altogether (not recommended).
*

$exclude_authors_comments (Default: true) Set to true to exclude an author's comments from his/her own posts. Set to false to include them.
*

$link_to_commenters_websites (Default: true) Set to true to hyperlink the comment author's name to the website they enter on your comment form. Set to false to suppress hyperlinking.
*

$suppress_trackbacks (Default: true) If true, trackbacks and pingbacks are excluded from the comment list. Set to false to include them.
*

$identify_authors_by and $excludes_sql_list (Default: no exclusions) These two fields work in conjunction to allow you to specify a list of comments whose comments should never be included in the list. (Note that most blog installation will not need to use this functionality.)
First, choose the criterion by which you want to identify the excluded comments and set $identify_authors_by to one of:
o 'comment_author',
o 'comment_author_url' or
o 'comment_author_email'.
Then add the excluded commenters to the list $excludes_sql_list; be careful to follow the correct format, which is: ('COMMENTER_1', 'COMMENTER_2', ..., 'COMMENTER_N').
You must specify the COMMENTERs in a way that matches the value of $identify_authors_by. I.e., if $identify_authors_by is 'comment_author_email', then the COMMENTERs in $excludes_sql_list must all be email addresses.

Revision History

0.1 (May 1, 2005): Initial revision.

0.2 (October 30, 2005): Rewrite and add new features.

0.3 (November 11, 2005): Clean up for publication.

0.4 (?)

0.5 (April 4, 2007): Add $link_to_commenters_websites option.
installation :

How to Install It

1. Download the plugin file, and put it file in your WordPress plugin directory, wp-content/plugins. (Make sure to name it rr_recent_love.php.
2. Enable the plugin in the WordPress Plugin Admin panel.

How to Use It

Just insert the following call into your theme files, wherever you want the comment list to appear (e.g., sidebar.php):

<?php echo rr_recent_comments(); ?>

Just insert the following call into your theme files, wherever you want the comment list to appear (e.g., sidebar.php):

<ul class='recent_comments'>
<?php echo rr_recent_comments(); ?>
</ul>

License: Freeware

Related: Comments, Comment, default, Display, Recent, Include, Author, identify authors, recent comments, parameters, false, excluded, excludes sql list, included, finally, posts, Tweak

O/S:BSD, Linux, Solaris, Mac OS X

File Size: 20.5 KB

Downloads: 2



More Similar Code

Retrieves a list of comments posted on other sites (with the help of a hidden post and trackbacks).

Installation :

Visit http://www.neiluchitel.com/index.php?p=179 for a tutorial on setting this up.



Here is a quick and dirty way to sort a list of dictionary based on a key value.



One of the most frequently asked questions is how to efficiently get a list of Python dictionaries from a database query rather than the difficult-to-use list of tuples.



Group a list of items according to the starting character(s) of items.
This is based on Raymond Hettinger's groupby class:
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/259173



Sometimes you get a list of lists and want to swap rows and columns, i.e. transpose the list. Yet, what if the rows have different lengths? Here is some advice you might find useful in such situations.



I often return result sets from a database call using a list of dictionary objects. When transmitting the pickled list object over the wire, the size of the pickle greatly effects the speed of the transmission.

I wrote this small class...



This module takes a list of equal length lists and converts it into XML.

If the first sublist is a list of headings, these are used to form the element names of the rest of the data, or these can be defined in the function call. Root...



A simple widget that will display a list of your sticky posts.

Install :

1. Download and unzip the most recent version of this plugin
2. Upload the sticky-posts-widget folder to...



This function takes a range in form of "a-b" and generate a list of numbers between a and b inclusive.
Also accepts comma separated ranges like "a-b,c-d,f" will build a list which will include numbers from a to b, a to d...



Generates a list of links used in a post. This can be used to create a list of references like those in scientific publications. Add [lor] at the end of your post (or wherever you want the list of references) and add a title attribute to all links...

User Review for Recent Love - A List of Recent Comments
- required fields
     

Please enter text on the image