Hey, nice hack there you made Abe1. /me clicked installed.
I made a modification to optimize the querying part of the hack as follow:
In plugin Post Thank You Hack at postbit_display_start, I'd changed:
PHP Code:
$post_thanks_querys = $db->query("SELECT postid FROM ". TABLE_PREFIX ."post WHERE threadid = '$post[threadid]'");
$post_thanks_postids = 0;
while ($post_thanks_query = $db->fetch_array($post_thanks_querys))
{
$post_thanks_postids .= ",$post_thanks_query[postid]";
}
$post_thanks_cashe = $db->query("SELECT * FROM " .TABLE_PREFIX. "post_thanks WHERE postid IN ($post_thanks_postids) ORDER BY username ASC");
Into
PHP Code:
$post_thanks_cashe = $db->query("SELECT " . TABLE_PREFIX . "post_thanks.* FROM " . TABLE_PREFIX . "post_thanks, " . TABLE_PREFIX . "post WHERE post.postid = post_thanks.postid AND post.threadid = '$post[threadid]' ORDER BY " . TABLE_PREFIX . "post_thanks.username ASC");
It shortened the querying by one query, for some small or moderate boards, it doesn't make any noticeable different. But in any large board, it does help a lot.
You can include the mod if you want. Thanks for great hack!