No Single Character Search

Started by Aaron, August 07, 2007, 06:47:55 PM

Previous topic - Next topic

Aaron

Link to Mod

The "No Single Character Search" mod makes it impossible to search for single characters. Doing so is very useful, as such search queries stress the server quite a lot, especially on huge forums.

This mod is a backport of an SMF 2.0 bugfix commited by Grudge.

ivo2296

#1
Hello,

is there way to set minimum 3 or 4 characters in search field or let say the admin to be able to choose the length of minimum characters?

But works also when elseif (strlen($value) < 3) is edit manually.
Thanks!

Aaron

As you already pointed out by yourself, the easiest way to do that is by editing the mod slightly. I considered making the character limit configurable though, but decided not to do so, as the benefit of doing so would be minimal.

GrnEyedDvl


Aaron


kamili34


GrnEyedDvl

Changing that value makes you enter 3 characters, but if you enter 2 characters you get an error that says:

Each word must be at least two characters long.


Where do I change it to say "three"?

GrnEyedDvl

Nevermind I found it

Errors.english.php

ivo2296

Hi,
i have small error in forum's log:
http://www.mydomain.com/index.php?action=search2
8: Undefined index: username
file: /home/xxx/public_html/Sources/Search.php
line: 2292

Is it possible, the reason for this error to be when user try to search with less that allowed characters?

Thanks!

Aaron

No, that error is definitely not related to this mod.

ivo2296

Quote from: Aäron on April 02, 2008, 05:00:16 AM
No, that error is definitely not related to this mod.

Thanks, i just try to eliminate some possibilities.

OriginalP

Thanks Aäron, nice mod

What about adding italian localization?

'Each word must be at least two characters long.' = 'Ciascuna parola deve essere lunga almeno due caratteri'

p1tereq

#12
Polish translation chief...

=> polish

QuotePoszukiwana fraza powinna się składać co najmniej z dwóch liter.

=> polish-utf8

QuotePoszukiwana fraza powinna składa&#263; si&#281; co najmniej z dw&#243;ch liter.

Best luck,
Pete.
Seeing the beauty of diversity in...

Advertisement: