Go Back   ThinkDing > Member Forums > Hacks & Modifications
Acceptance Mark
User Name

Thread Tools Search this Thread
Old 08-07-2005, 04:51 AM
Winston Winston is offline
Join Date: Jul 2005
Posts: 46
Default Remove characters for total length count

Say the number of characters to ignore is set to two in the config file. Then a search on "ab" (without quotes and no space) is ignored, but a search on "a b" (without quotes but with a space) is not ignored. That's where this little mod comes into play. It will remove characters you don't want to count before checking total length. If the total length is less than or equal to the number of characters to ignore, no search results are rendered. Otherwise, searches are performed as usual.

In tdSearch.php find:
if (strlen(trim(stripslashes($query))) <= $chars_to_ign) { $query = ""; }

And replace with:
// set chars to remove - for ' use \' and for \ use \\ etcetera $what_to_ign = array(' ','"','+','?','-',' and ',' or ',' not ','whatever'); if (strlen(trim(str_replace($what_to_ign,"",stripslashes($query)))) <= $chars_to_ign) { $query = ""; }
Reply With Quote
Old 08-28-2005, 09:31 AM
SoapinTrucker's Avatar
SoapinTrucker SoapinTrucker is offline
Join Date: Jul 2005
Location: Fresno, California
Posts: 38

I just installed this mod, I LOVE it, thanks, it's VERY handy!!!!!
Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

All times are GMT. The time now is 07:16 PM.

Powered by: vBulletin Version 3.0.7
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright © 2001 - 2005, ThinkDing LLC. All Rights Reserved.