Em3 My Friends

Lists those who’ve commented on your blog. The default installation lists these fine folk by descending number of approved comments but you can change this to list by name instead as well as change the minimum number of comments to qualify for listing and a maximum number of people to list.

The Variables
$num
The number of friends to list (set it to 0 to show all). Default is 30 if not specified.
$minposts
The minimum number of approved comments they must have to qualify (foils evil spammers)
$alphasort
Set to 1 if you want the list sorted alphabetically. Otherwise it will list in order of the number of comments left (highest first). Default is 0 (sorted by number of comments left)

 

The Code
View it as a text file (so you can read it first - save this as em3_my_friends.php and upload it to your wp-content/plugins folder.
 
The Notes
As a default it’ll show the top 30 commenters ($num) who’ve left at least 5 comments ($minposts) if they’ve left a URL to link to. I have had to tidy up a few of my friends’ URLs to amalgamate slightly different spellings and cope with changes of domain name but that didn’t take long - a simple query in phpMyAdmin along the lines of:
UPDATE ‘xxx_comments’ SET comment_author_url = ‘http://whatever.com’ WHERE comment_author=’Charlie’
does it in no time.
 
The Instructions
To use the plugin, save the text file in wp-content/plugins as em3_my_friends.php, activate it and call
<php show_friends(); ?>
in your sidebar.

For example, in my own sidebar I have:

<li><h2>My friends</h2>
<? php show_friends(); ?>
</li>

Leave a Reply