Suggestion
To include a list of all users who reputated the thread without adding any query (!) you do this:
Code:
$hook_query_fields .= ",IF(reputationbit.reputationid,CONCAT('<br /><div>Users who liked this post</div>',GROUP_CONCAT(DISTINCT CONCAT('<a href=\"member.php?u=',reputationbit.whoadded,'\">',reputationbit.username,'</a><br /><span style=\"color:#333333\">',reputationbit.reason,'</span>') ORDER BY reputationbit.reason DESC SEPARATOR '<br />')),'') AS reputationbits";
$hook_query_joins .= "LEFT JOIN (SELECT reputationid, reputation.postid, reputation.whoadded,reputation.dateline, user.username, reputation.reason
FROM reputation,user WHERE user.userid=reputation.whoadded) AS reputationbit ON reputationbit.postid = post.postid";
$postids .= " GROUP BY post.postid ";
Use this for your reputation table, too.