I've managed to make my
Search Thread hack work with this, which is great.
Very simple.
1) Install my search hack here first before installing this hack:
https://vborg.vbsupport.ru/showthrea...threadid=45142
If you've already installed my hack, that's fine. Go to next step.
2) Then, install this hack (after installing my hack first).
3) Then, find this block of code (which is from this hack) in search.php:
PHP Code:
// check for existing query:
if ($getsearch=$DB_site->query_first("SELECT searchid FROM search WHERE showposts='".intval($showposts)."' AND query='".addslashes($wheresql)."' AND postids='".addslashes($goodpostlist)."' AND querystring='".addslashes($masterquery)."'")) {
$DB_site->query("UPDATE search SET dateline=".time().", userid=$bbuserinfo[userid], ipaddress='".addslashes($ipaddress)."' WHERE searchid=$getsearch[searchid]");
$searchid=$getsearch[searchid];
} else {
// insert query into db
$DB_site->query("INSERT INTO search (searchid,query,postids,dateline,querystring,showposts,userid,ipaddress) VALUES (NULL,'".addslashes($wheresql)."','".addslashes($goodpostlist)."',".time().",'".addslashes($masterquery)."','".intval($showposts)."',$bbuserinfo[userid],'".addslashes($ipaddress)."')");
$searchid=$DB_site->insert_id();
}
Replace with this:
PHP Code:
// search thread - Erwin
if (!$threadid) {
$threadid="0";
}
// check for existing query:
if ($getsearch=$DB_site->query_first("SELECT searchid FROM search WHERE showposts='".intval($showposts)."' AND query='".addslashes($wheresql)."' AND postids='".addslashes($goodpostlist)."' AND querystring='".addslashes($masterquery)."'")) {
$DB_site->query("UPDATE search SET dateline=".time().", userid=$bbuserinfo[userid], ipaddress='".addslashes($ipaddress)."', threadid=$threadid WHERE searchid=$getsearch[searchid]");
$searchid=$getsearch[searchid];
} else {
// insert query into db
$DB_site->query("INSERT INTO search (searchid,query,postids,dateline,querystring,showposts,userid,ipaddress,threadid) VALUES (NULL,'".addslashes($wheresql)."','".addslashes($goodpostlist)."',".time().",'".addslashes($masterquery)."','".intval($showposts)."',$bbuserinfo[userid],'".addslashes($ipaddress)."',$threadid)");
$searchid=$DB_site->insert_id();
}
// search thread - Erwin
Alternative, if you've already installed this hack first, you can install my hack after, and skip PHP steps (1) and (2) in my instructions, and instead use Step (2) above, then follow the instructions (3)-(6) in my instructions.
Thanks, my Search Thread is much faster. I notice this new search is smarter and ignores common words too.