Thread: Show Thread Enhancements - [AJAX] Post Thank You Hack
View Single Post
  #1534  
Old 17 May 2011, 15:17
channelfuse's Avatar
channelfuse channelfuse is offline
 
Join Date: Nov 2008
Here's the fix for the searching. Replace post_thanks.php with this file.

What was wrong:
It was looking in an old table 'search' for the results. This no longer works.

What was fixed:
I have the initial SQL statement grab the thread IDs and post IDs:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Then, we need to throw them into an array:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

The old code is commented out in other areas.

Then, we need to create our query to match the way vB 4.x wants it.

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

We create our search criteria, serialize it and then get the hash of it. We then serialize our IDs. The way vB's results.php wants the results is ordered such as:

array of threadIDs/postIDs
number of 'confirmed' posts (No idea what this is, left it as 0).
array of groups seen (No idea on this, just make an empty array).
array of groups denied (Again, no clue. Just made an empty array).

We then insert the data into the searchlog table and use that to generate the search results. I also included some various files at the beginning and setup a variable for the whole search thing:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

That's it. Searching via User CP should work.
Attached Files
File Type: php post_thanks.php (19.6 KB, 317 views)
__________________
Reply With Quote