Comment Plugger Help
-
hi there I’m currently using the comment plugger at: https://dev.wp-plugins.org/browser/comment-plugger/
but my problem is that I can’t get rid of the comma for the last commentor is there a way that I can do that?
my site is at: https://log.serene-sky.net/
Thanks
Just in case if you need to see the plugger code then here it is:
<?php
/*
Plugin Name: Comment Plugger
Plugin URI: https://mtdewvirus.com/code/wordpress-plugins/
Description: Gives a list of that last people to comment on a post, with a link to their site if they provided one.
Version: 1.03
Author: Nick Momrik
Author URI: https://mtdewvirus.com/
*/function mdv_comment_plugger($before = ”, $limit = 5) {
global $wpdb, $id;
$request = “SELECT comment_author, comment_author_email, comment_author_url, MAX(comment_ID) as comment_ID FROM $wpdb->comments”;
$request .= ” WHERE comment_post_ID=’$id’ AND comment_approved = ‘1’ GROUP BY comment_author_email ORDER BY comment_ID”;
$request .= ($limit > 0) ? ” LIMIT $limit” : ”;
$commenters = $wpdb->get_results($request);if ($commenters) {
$output = ”;
foreach ($commenters as $commenter) {
if ($comment_author == “”)
$comment_author = “anonymous”;
if (!empty($commenter->comment_author_url))
$output .= ‘comment_author_url . ‘” title=”‘ . $commenter->comment_author . ‘”>’ . $commenter->comment_author . ‘, ‘;
else $output .= ‘ ‘ . $commenter->comment_author . ‘, ‘;
}echo $before . ‘ ‘ . $output . ‘ ‘;
}
}
?>
- The topic ‘Comment Plugger Help’ is closed to new replies.