Ignore maxresults in "Search by username"
This modification is in the archives.
Hello everyone,
I've been lurking for the past several years and figured I should probably start sharing a few quick hacks to "give back". I did a quick search but couldn't find anything that did this.... What this does: Makes "Find all posts by (member name)" actually find ALL posts by that member and ignores the value you specify (via the AdminCP) for your maximum search results (maxresults). This maxresults limit is also ignored if someone specifies a username in your "advanced search" options. It's good for boards that want to keep the maxresults limited for performance reasons, however still want to allow members to search for all their (or someone else's) past posts. On to the hack: This one is real quick, only three lines are edited in one file. In search.php: 1. Find: PHP Code:
if ($vboptions['maxresults'] > 0 AND $numitems > $vboptions['maxresults'])
PHP Code:
if ($vboptions['maxresults'] > 0 AND $numitems > $vboptions['maxresults'] AND !$search['searchuser'])
PHP Code:
$threads = $DB_site->query("
PHP Code:
$threads = $DB_site->query("
PHP Code:
LIMIT " . ($vboptions['maxresults'] * 2) . "
Download No files for download. |