Here are a couple of optional enhancements to the hack. If you want to block this type of search for a time period longer than a few days, you can modify the line listed in the first post to something like:
Code:
if (empty($query) AND empty($searchuser) AND empty($replyless) AND (($searchdate == 0) OR ($searchdate > 7)))
This example will not allow the search if Any Date is selected, or any option greater than "a week ago" is selected (7 days). You can change the 7 to any number of days you want.
Also, if you want to change the message that pops up if the user doesn't set "Find Posts From" to an acceptable value, you need to use the Phrase Manager.
- In the admin page, open Phrase Manager under Languages and Phrases.
- Click Search In Phrases
- Enter searchspecifyterms in Search for Text and change Search In to Phrase Variable Name Only.
- Click Find
- Click Edit.
- Enter the text that you want to appear in this message.
For example, if you uses the above 7 day limit, you might want to change the message text to something like.
Quote:
Please specify some keywords or valid user names to search on, or leave them blank and set Find Posts From to a value between Yesterday and A Week Ago to view all recent posts. There were no matches for your settings.
|