Copy these codes into your my-hacks.php file;
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25 function comment_plugger($before = '', $limit = 5, $sep = ', ') {
global $wpdb, $tablecomments, $id;
$request = "SELECT comment_author, comment_author_url, MAX(comment_ID) as comment_ID FROM $tablecomments";
$request .= " WHERE comment_post_ID='$id' AND comment_approved = '1' GROUP BY comment_author, comment_author_url ORDER BY comment_ID DESC";
$request .= ($limit > 0) ? " LIMIT $limit" : '';
$commenters = $wpdb->get_results($request);
if ($commenters) {
$output = '';
foreach ($commenters as $commenter) {
if (!empty($commenter->comment_author_url)) {
$output[] = '<a href="' . $commenter->comment_author_url . '" title="' . $commenter->comment_author . '">' . $commenter->comment_author . '';
}
else {
$output[] = $commenter->comment_author;
}
}
if (is_array($output)) {
echo $before.implode($sep, $output);
}
} else {
// echo "No one...yet."
}
}
(Click here for more info about configuring the my-hacks.php file)
And place the code below in your index.php file for function calling to return the commenters name;
<?php comment_plugger(); ?>
Comment?
»
Leave a comment
ajwa . Naj . Wawa . 27 . 











