I get complaints about my site's search function all the time, and it is always the same problem: they are searching from the built-in form on the main menu rather than from the Advanced Search menu, and thus they are limiting their searches to the default of one week.

Really this is very silly; people only search for stuff they aren't seeing in the first couple pages and few boards get enough traffic to roll back that fast. This default should really be set to a year at least.

Can anyone tell me how to change this? I am sure it has to be in the Settings.pl file or something somewhere.

Thanks,Zach

IP Logged

Bill Myers

God MemberBeta Testers
Offline

Posts: 1,829
Location: Los Angeles

YaBB 2.4

Re: Set Search Default to Longer than One Week?Reply #1 - Mar 8th, 2012 at 11:02pm

Zach, this isn't the real solution, but mainly because the search engine box wasn't working in our forum, and nobody here to date has figured out how to fix this, I simply removed that search box so that the only search option left is the better and more comprehensive one that's located on the menu.

For those who may have missed the discussions about it, evidently there are many forums that have inoperable search engine boxes anyway, so why have it available? All it does is a simple search anyway.

Morning, noon, or night, have a great one!

Note: Like most others, this forum doesn't allow us to freely edit our posts or topics to make corrections as needed, so please remember to look for subsequent posts if you see any mistakes or outdated information. Sorry for the inconvenience.

Re: Set Search Default to Longer than One Week?Reply #2 - Mar 13th, 2012 at 9:50pm

In Sources\Subs.pl look for the section setting up the search box.There should be a line like: <input type="hidden" name="age" value="31" />(Line 380 in YaBB2.5)Change the value to the number of days you would like.

In SourcesSubs.pl look for the section setting up the search box.There should be a line like: <input type="hidden" name="age" value="31" />(Line 380 in YaBB2.5)Change the value to the number of days you would like.

Thank you. This is very helpful.

Your help inspired me to put back the YaBB searchbox in our forum, which I can happily say is working fine now.

Regarding YaBB's searchbox restrictions, I added text below the searchbox feature to remind members that YaBB has a more extensive search option available to them.

Note: Because of how different browsers format your forum, including when windows are repositioned to be smaller, you may want to limit any text you place underneath your searchbox if you add text at all.

As it turned out, after testing different browsers, and different sized windows, I ended up with simpler text as follows:

Note: Like most others, this forum doesn't allow us to freely edit our posts or topics to make corrections as needed, so please remember to look for subsequent posts if you see any mistakes or outdated information. Sorry for the inconvenience.

Zach, this isn't the real solution, but mainly because the search engine box wasn't working in our forum, and nobody here to date has figured out how to fix this, I simply removed that search box so that the only search option left is the better and more comprehensive one that's located on the menu.

For those who may have missed the discussions about it, evidently there are many forums that have inoperable search engine boxes anyway, so why have it available? All it does is a simple search anyway.

Sorry to quote myself here, but this forum doesn't allow for posts to be edited for corrections after two days have passed if I remember correctly.

Evidently, I erroneously reported that our forum's "searchbox" was inoperable, and I know that other admins were reporting the same. What I didn't know was that YaBB's searchbox limits searches to 31 days. As such, reports of a searchbox being inoperable may be erroneous. At least in our forum that mistake was made.

The reason I suggested making edits to the template was because changing the Sources\Subs.pl file for many admins is beyond their expertise, and there's no way to use the Admin Center to change the default setting for the number of days the searchbox does its search.

Morning, noon, or night, have a great one!

Note: Like most others, this forum doesn't allow us to freely edit our posts or topics to make corrections as needed, so please remember to look for subsequent posts if you see any mistakes or outdated information. Sorry for the inconvenience.