Making the following changes caused the Post Thanks hack to start working again on my 3.8.11 installation. Note: I haven't tested extensively beyond seeing that I could give thanks and delete it from one other member's post.
GIANT DISCLAIMER: I am not an expert coder. I occasionally muck around in PHP and sometimes understand what I'm doing.
Apply this fix AT YOUR OWN RISK. I can't help if it doesn't work for you.
The changes below refer to
Post Thank You Hack version 7.6 only.
1) Back up a copy of your original 7.6 file in /forum/includes/functions_post_thanks.php in case this gets all screwed up.
2) Open the file in your favourite editor.
3) Starting at line 178, replace this...
Code:
if ($postids)
{
$post_ids = "0$postids";
}
else
{
$post_ids = $postid;
}
... with this:
Code:
if (empty($postids))
{
$postids[] = $postid;
}
4) A few lines below that (originally at line 189, but moved down due to the changes above), replace the this line ...
Code:
$thanks = $vbulletin->db->query_read("SELECT * FROM " .TABLE_PREFIX. "post_thanks AS post_thanks INNER JOIN " .TABLE_PREFIX. "user AS user USING (userid) WHERE post_thanks.postid IN (" . $post_ids . ") ORDER BY post_thanks.username ASC");
... with this:
Code:
$thanks = $vbulletin->db->query_read("SELECT * FROM " .TABLE_PREFIX. "post_thanks AS post_thanks INNER JOIN " .TABLE_PREFIX. "user AS user USING (userid) WHERE post_thanks.postid IN (" . implode(',', $postids) . ") ORDER BY post_thanks.username ASC");
5) A few lines below that (originally at line 193, but since moved further down due to the changes above), replace the this line ...
Code:
$thanks = $vbulletin->db->query_read("SELECT * FROM " .TABLE_PREFIX. "post_thanks WHERE postid IN (" . $post_ids . ") ORDER BY username ASC");
... with this:
Code:
$thanks = $vbulletin->db->query_read("SELECT * FROM " .TABLE_PREFIX. "post_thanks WHERE postid IN (" . implode(',', $postids) . ") ORDER BY username ASC");
6) Save & upload the file to /forum/includes.
Maybe it'll work for you too. Good luck!