Previous Thread
Next Thread
Print Thread
Rate Thread
[7.5.8] Max Search Date Range Fix for Large Forums #319252 04/23/2014 6:04 PM
Joined: Jul 2001
Posts: 958
isaac Online Happy OP
coffee and code
OP Online Happy
coffee and code
Joined: Jul 2001
Posts: 958
Requirements:
Valid UBB.Threads 7.5.8 install and license.

About:
If you have a large forum that has been online for longer than a single week, your forum quite possibly may be filled with all sorts of useful information. Make that information easier for your members to locate and with as few steps as necessary for them to locate it with.

This fix will automatically fill in the default "Maximum Search Date Range" (defined by Control Panel > Feature Settings > Search) to your forum's "Newer than" field inside search.tpl.

It will also set that "Maximum Search Date Range" as default for the user's search, instead of the near useless "1 week" default:

How-To:
Control Panel > Templates
Select "search.tpl" and click on "Edit Selected Template"

FIND:
Code
{$lang.NEWER} <input type="text" name="newerval" size="2" class="form-input" value="1" />
<select name="newertype" class="form-select">
<option value=""></option>
<option value="d">{$lang.DAY}</option>
<option value="w" selected="selected">{$lang.WEEK}</option>
<option value="m">{$lang.MONTH}</option>
<option value="y">{$lang.YEAR}</option>


REPLACE WITH:
Code
{$lang.NEWER} <input type="text" name="newerval" size="2" class="form-input" value="{$config.MAX_SEARCH_RANGE_VALUE}" />
<select name="newertype" class="form-select">
<option value=""></option>
<option value="d">{$lang.DAY}</option>
<option value="w">{$lang.WEEK}</option>
<option value="m">{$lang.MONTH}</option>
<option value="y" selected="selected">{$lang.YEAR}</option>


Done.


Notes:
Configure your forum's "Maximum Search Date Range" at
Control Panel > Feature Settings > Search

DEFAULT SETTINGS:
Search Method to Use: MySQL Full-Text
Maximum Search Date Range: 1 Year
Minimum Searchable Word Length: 3
Maximum Results from Search: 200

SETTINGS I RECOMMEND FOR OLDER SITES THAT HAVE A LOT OF USEFUL OLDER CONTENT:
Search Method to Use: UBB.threads Internal
Maximum Search Date Range: 20 Years
Minimum Searchable Word Length: 3
Maximum Results from Search: 400

Since there is no "ALL" setting for "Maximum Search Date Range", setting it to something big, such as "20 Years" is a good equivalent to that.

As a side note/recommendation --

In your php.ini (for PHP5.2.1+) your memory limit should be set at least to 128M
; Maximum amount of memory a script may consume
memory_limit = 128M

Your server really should be running on at least PHP 5.2.1 - for major stability and security enhancements
for more information, visit http://php.net/releases/5_2_1.php

in PHP 5.2.0, the default was "16M"
prior to PHP 5.2.0, the default was "8M"
for more information, visit http://php.net/memory-limit


isaac @ id242.com // my forum @ CelicaHobby.com
a current developer of UBB.threads php forum software // 7.7.1 Released
Sponsored Links
Re: [7.5.8] Max Search Date Range Fix for Large Forums [Re: isaac] #319253 04/23/2014 9:25 PM
Joined: Jan 2000
Posts: 5,781
Gizmo Offline
UBB.Dev / UBB.Wiki Owner
Time Lord
Offline
UBB.Dev / UBB.Wiki Owner
Time Lord
Joined: Jan 2000
Posts: 5,781
I did this at A Gardeners Forum too, along with a few other small tweaks


UBB.Dev - Putting Dev into UBB.threads
Company: VNC Web Services - UBB.threads Scripts and Scripting, Install and Upgrade Services, Site and Server Maintenance.
Forums: A Gardeners Forum, Scouters World, and UGN Security
UBB.Threads: My UBB Themes, UBB.Sitemaps
Re: [7.5.8] Max Search Date Range Fix for Large Forums [Re: isaac] #319254 04/23/2014 9:47 PM
Joined: Dec 2001
Posts: 87
Bill B Offline
Power User
Offline
Power User
Joined: Dec 2001
Posts: 87
I just added it to my vintage Chev site this morning... It definitely makes it easier for members to use now.

Thanks id242.

--Bill B


Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with, and recommend, the following Web Hosts:
· Stable Host
· Blue Host
· Interserver.net
Visit us on Facebook
Member Spotlight
badfrog
badfrog
somewhere on the coast of Maine
Posts: 94
Joined: March 2007
Show All Member Profiles 
Forum Statistics
Forums64
Topics37,486
Posts293,597
Members13,815
Most Online1,498
Mar 17th, 2017
Top Posters(All Time)
AllenAyres 21,084
JoshPet 10,370
LK 7,395
Lord Dexter 6,709
Gizmo 5,781
Greg Hard 4,625
Top Posters(30 Days)
isaac 6
Haavel 1
Today's Statistics
Currently Online 408
Topics Created 1
Posts Made 1
Users Online 3
Birthdays 25
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2019 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 7.7.2
(Snapshot build 20190421.dev)
PHP: 5.4.45 Page Time: 0.028s Queries: 15 (0.009s) Memory: 3.2059 MB (Peak: 3.4317 MB) Data Comp: Zlib Server Time: 2019-04-26 00:49:51 UTC
Valid HTML 5 and Valid CSS