Is there a way around the case sensitive highlighting of search results? I would like to have the search results highlight both upper and lowercase keywords regardless of the case the user uses to search.
It uses str_replace, which is case sensitive, and the case insensitive str_ireplace is only in PHP 5. In theory the highlighting area near the top of each of the classes could be changed to use ereg_ireplace but I don't currently plan to make to make such a change, particularly as regular expressions tend to take me forever to write and end up buggy. So basically no, but not a final no.
Comments on Search Highlighting Case Sensitive
Beginner
Usergroup: Customer
Joined: Jul 15, 2005
Total Topics: 2
Total Comments: 4
Is there a way around the case sensitive highlighting of search results? I would like to have the search results highlight both upper and lowercase keywords regardless of the case the user uses to search.
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
It uses str_replace, which is case sensitive, and the case insensitive str_ireplace is only in PHP 5. In theory the highlighting area near the top of each of the classes could be changed to use ereg_ireplace but I don't currently plan to make to make such a change, particularly as regular expressions tend to take me forever to write and end up buggy. So basically no, but not a final no.
Beginner
Usergroup: Customer
Joined: Jul 15, 2005
Total Topics: 2
Total Comments: 4
Thanks for the info. I'm very impressed with your script.