Ok, I have code capable of doing this, but I don’t know how to limit the comments to a category, and if I am using this code in two instances it might be a heavy load on the server. Here is the code (so far):
<?php>
$sqlstr = '';
$blog_list = get_blog_list( 0, 'all' );
$sqlstr = "SELECT 1 as blog_id, comment_date, comment_id, comment_post_id, comment_content, comment_date_gmt, comment_author, comment_author_email from ".$table_prefix ."comments where comment_approved = 1 ";
$uni = '';
foreach ($blog_list AS $blog) {
$uni = ' union ';
$sqlstr .= $uni . " SELECT ".$blog['blog_id']." as blog_id, comment_date, comment_id, comment_post_id, comment_content, comment_date_gmt, comment_author, comment_author_email from ".$table_prefix .$blog['blog_id']."_comments where comment_approved = 1 ";
}
$limit = '20';
$limit = ' LIMIT 0, '. (int)$wgt_count;
$sqlstr .= " ORDER BY comment_date_gmt desc " . $limit;
$comm_list = $wpdb->get_results($sqlstr, ARRAY_A);
?>
<!--the output before styling-->
<ul>
<?php
$count = 0;
foreach((array)$comm_list as $comment):
$count++;
if($count == $number+1) break;
?>
<li>
<?php echo get_avatar($comment->comment_author_email, 32); ?>
<a href="<?php echo get_blog_permalink($comment->blog_id, $comment->comment_post_ID); ?>" title="commented on <?php echo strip_tags($comment->post_title); ?>">
<?php echo $comment->comment_author; ?> wrote:
<?php echo convert_smilies(wp_trim_excerpt($comment->comment_content)); ?>
(<?php echo human_time_diff(strtotime("{$comment->comment_date_gmt}")); ?>)
</a>
</li>
<?php
endforeach;
?>
</ul>