Search field for searching complete names

archivo

Joined: 2014-04-25
Posts: 6
Posted: Fri, 2014-04-25 14:23

Hi. I was wondering if it is possible to configure the search module to return exact matches only. I need the search box to be used to search full names, for example: "Brian Waters".

Right now I get all the result for Brian and Waters. Its only problem because I also have tags for "Ryan Waters" for example so when I search for "Brian Waters" I´ll get all the pictures with Brian, and all the pictures with Waters, which is a lot more of what we need.

Thanks for your help.

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Fri, 2014-04-25 16:26
 
archivo

Joined: 2014-04-25
Posts: 6
Posted: Fri, 2014-04-25 19:36

Thanks a lot. Unfortunately it does´t work. The search comes back with more results that it should.
There is one picture with Brian Waters and one with Ryan Waters in the gallery hosted: http://www.linacortes.com/nogales/index.php/

Any ideas?

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Fri, 2014-04-25 21:21
Quote:
+Brian +Waters

Seems to work.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
archivo

Joined: 2014-04-25
Posts: 6
Posted: Fri, 2014-04-25 21:31

Think I go it!
In the search.php file line 30
if ((substr($terms[$i], 0, 1) != '"') && (substr($terms[$i], -1, 1) != "*")) {
change it for
if ((substr($terms[$i], 0, 1) != '') && (substr($terms[$i], -1, 1) != "*")) {

And It works!