Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Block search terms

Quote Reply
Block search terms
Every day I have the same two searches in my search log - 1 and -1'

Is there any way of blocking search terms?

Last edited by:

MJB: Jan 11, 2015, 8:09 AM
Quote Reply
Re: [MJB] Block search terms In reply to
If you say only wanna allow for a certain number of characters, you could try tweaking /Links/User/Search.pm:

Code:
return search() if defined $args->{query} and $args->{query} =~ /\S/;

Change to:

Code:
return search() if defined $args->{query} and $args->{query} =~ /\S/ and length $args->{query} > 2;

See if that helps :)

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Block search terms In reply to
Will give it a try.

Thanks Andy