Webmastersite.net
Register Log In

Highlight Search Results not working

Comments on Highlight Search Results not working

joshberm
Nothing is impossible...

Usergroup: Customer
Joined: Aug 07, 2006
Location: Tampa, Florida

Total Topics: 36
Total Comments: 91
Posted Oct 31, 2006 - 1:17 PM:

My search words are not highlighting on the Links results page.

Have not changed my stylesheet WRT highlighting, and have not removed anything from the results template either.

Attached Files:
Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
Posted Nov 03, 2006 - 9:23 AM:

They highlight for me, but if you use wsn codes in your descriptions it was recently fixed to automatically avoid highlighting so that the codes don't get messed up.
joshberm
Nothing is impossible...

Usergroup: Customer
Joined: Aug 07, 2006
Location: Tampa, Florida

Total Topics: 36
Total Comments: 91
Posted Nov 03, 2006 - 9:55 AM:

I don't use WSN codes or HTML in descriptions. Could it have anything to do with PHP settings?
Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
Posted Nov 04, 2006 - 3:41 PM:

I see it does highlight for you if you type a term that appears... try searching for "Hair". I guess you're expecting something it's not supposed to do.
joshberm
Nothing is impossible...

Usergroup: Customer
Joined: Aug 07, 2006
Location: Tampa, Florida

Total Topics: 36
Total Comments: 91
Posted Nov 04, 2006 - 5:08 PM:

OK, here is the problem. It seems that the search highlighting feature is case sensitive, while the actual search term does NOT need to match the case.

(See screenshots)

So my question then becomes:

1. How to highlight both "hair" and "Hair"
2. How to highlight the "Hair" in "Hairmasters"

Attached Files:
Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
Posted Nov 06, 2006 - 5:41 PM:

It's the line
   else return preg_replace('/[a-zA-Z]+/e', ''\0' == '' . $search . '' ? '' . $replace . '': '\0';', $subject); 
in commonfuncs.php, but unfortunately I don't know how to make the regular expression case-insensitive. The documentation says /e -> /ie but that doesn't work.
Search thread for
Download thread as
  • 0/5
  • 1
  • 2
  • 3
  • 4
  • 5



This thread is closed, so you cannot post a reply.