Support » Plugins and Hacks » Search Hilite does not work

  • I activate plugin Search Hilite but it does not hightlight search keyword at all.
    Rarely, WP can highlight some simple, short word like “on”… but most of the time,
    it does not highlight anything.
    I use WordPress 1.2 and 1.3 beta., Unicode..
    Is there any solution or explanation how search feature of WP work?
    Thanks a lot.

Viewing 15 replies - 1 through 15 (of 18 total)
  • *BUMP*
    Any feedback on this? I found the same thing that the Hilite plugin activated from the admin interface doesn’t hilite.

    minhcuong: Well, can’t do much without a link. I have 1.3 and hilite works as billed. It does not, however, highlight words where only a single post is returned, only if two or more posts containing the word are found.
    phpNeophyte: Do you even have the plugin switched on? I ask because the style in not in the source on a returned search.

    It has to do with returning the same posts – Try this: search for “customers” then “hardware” then “business” (a submit late and a dollar short).
    Fortunately, it is not intermittent – the issues are reproducible. It does what it does, but with limitations.

    So, since we are returning the same 3 or 4 pages of content (at the moment) even though there are different terms, it only highlights the first couple of unique searches and then since all the rest of the terms being searched are on pages that have already been returned there are no highlights… correct?

    my experience also suggests hilite is very unpredictable. i have rarely seen the highlighting on blogs i have tried it on.

    As far as I can tell, there are two things wrong with the hilite plugin when using the WordPress search.
    1. It gives the referer precedence over the current url’s query string. I would recommend we change the logic in get_search_query_terms() to
    case ‘wordpress’:
    // Check the search form vars if the search terms
    // aren’t in the referer. Do this first, ignore the
    // referer if we can!
    if (isset($s_array) and sizeof($s_array) > 0 ) {
    $query_array = $s_array;
    } else if (isset($s) and $s) {
    $query_array = array($s);

    2. The search behaviour when matching a single post doesn’t play well with the plugin. If we match a single post, you are redirected from the search you were trying to do, onto the single post page. Your referer is the page where you initiated the search (which might have an old search term in it) , and your query string has no search terms. If you put the query string s=blah back into the url, it will bounce you back to one without it.
    Some examples:
    Start on /index.php, search ‘uncommon’ /index.php?s=uncommon, bounced to one page /index.php?p=1 with referer=/index.php your start page.
    Start on /index.php?s=common (just finished a search for a common word), search ‘uncommon’ /index.php?s=uncommon, bounced to one page /index.php?p=1 with referer=/index.php?s=common (your start page), so it will hilite the ‘common’ word on this page, even though you were searching for uncommon.

    Was this one of the plug-ins that came with WP? or is it one available somewhere else?

    It came with WP.

    Will this work if I use a search engine hack or does it only work for Google and other external engines?

    I guess at this time, with the amount of information provided, the only possible answer is maybe, maybe not – sorry. Give it a whirl and if it does, great. If it doesn’t, no harm, no foul.

    Okay… I found the color CSS in the plug-in code. I’ll see what I can find on that search if anyone’s interested in trying…
    That was done in JavaScript, yes?

    Is there any CSS tag ???? maybe I deleted it … but Hilite is not working on my system 🙁

    You’ll have to post a link to your page in order to get appropriate help. The plugin should place css within the page (look in the head section of the source of the search page).

    Beel, I still doing the layout, but it’s ok.
    The HT stills not working.

    No, I see it is not. The css is in the source but for some reason the searched for word is not wrapped with the hilite class. I’ll have to grab a cup of coffee and put on my thinking cap…

Viewing 15 replies - 1 through 15 (of 18 total)
  • The topic ‘Search Hilite does not work’ is closed to new replies.