Great hack, thanks!
I was experiencing some slowness as well, so I tried to come up with a way to limit this feature to only selected forums.
Basically, at the start of the codechunk.txt, put this...
PHP Code:
if ($curforumid==2 or $curforumid==3 or $curforumid==4) {
$similarforum = "2,3,4"; //Limit search to these forums
...replacing the curforumid numbers with whatever forums you want to have include this feature, and the similarforum numbers to whatever forums you want the feature to search for matches.
At the end of codechunk.txt put this:
Now delete everything from...
PHP Code:
$forumperms = $DB_site->query("
...down to:
PHP Code:
$iforumperms = 'AND thread.forumid IN( ' . implode( ',' , $iforumperms ) . ' )';
}
As its unnecessary to check forum permissions when you're specifying what forums to find matches in.
Now, find this line:
PHP Code:
WHERE thread.threadid<>$thread[threadid] $iforumperms
And replace it with this:
PHP Code:
WHERE thread.threadid<>$thread[threadid]
Then find:
PHP Code:
AND thread.visible=1
And after that add:
PHP Code:
AND thread.forumid IN ($similarforum)
To only allow the hack to search for similar threads in those specified forums. However, it's still pretty slow for me, so I'm thinking something's not working right.
Any help would be greatly appreciated!