Error: Invalid SQL: SELECT * FROM vb_post_thanks AS post_thanks INNER JOIN vb_user AS user USING (userid) WHERE post_thanks.postid IN (0Array) ORDER BY post_thanks.username ASC;
MySQL Error : Unknown column '0Array' in 'where clause' Error Number : 1054
Solution:
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.
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");