MyBB Community Forums

Full Version: Why does MyBB encapsulate the seach via SID
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
(2016-09-20, 05:10 PM)Devilshakerz Wrote: [ -> ]The only problem with permanent search links is the method restriction - only POST requests are allowed.
This can be changed by removing the second condition:
 && $mybb->request_method == "post"
from https://github.com/mybb/mybb/blob/mybb_1....php#L1462 (similarly with @dragonexpert's Fast Search, in search2.php).
After applying this change, you will be able provide search parameters in the URL:
search.php?action=do_search&keywords=test

How exactly could i find what these parameters are? (keywords/username/and ?)

For example...i want to have a link that searches the last 7 days and posts with 0 responses...but has no keywords?
Either use a hook or make a file edit on search.php. You will want to use the array key querycache because when that is set, it executes that instead of relying on a list of threads or posts.

$cutoff = TIME_NOW - 86400 * 7;
$searcharray['querycache'] = "t.dateline < $cutoff AND t.replies=0";
Pages: 1 2