WordPress.org

Forums

Search Hilite does not work (19 posts)

  1. minhcuong
    Member
    Posted 11 years ago #

    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.
    Cuong,

  2. phpNeophyte
    Member
    Posted 11 years ago #

    *BUMP*
    Any feedback on this? I found the same thing that the Hilite plugin activated from the admin interface doesn't hilite.
    Kevin

  3. Beel
    Member
    Posted 11 years ago #

    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.

  4. Beel
    Member
    Posted 11 years ago #

    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.

  5. phpNeophyte
    Member
    Posted 11 years ago #

    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?
    Kevin

  6. OperaManiac
    Member
    Posted 11 years ago #

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

  7. ScottHeavner
    Member
    Posted 11 years ago #

    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;
    break;
    } else if (isset($s) and $s) {
    $query_array = array($s);
    break;
    }
    ...
    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.

  8. duches77
    Member
    Posted 10 years ago #

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

  9. Beel
    Member
    Posted 10 years ago #

    It came with WP.

  10. duches77
    Member
    Posted 10 years ago #

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

  11. Beel
    Member
    Posted 10 years ago #

    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.

  12. duches77
    Member
    Posted 10 years ago #

    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?

  13. Anonymous
    Unregistered
    Posted 10 years ago #

    Is there any CSS tag ???? maybe I deleted it ... but Hilite is not working on my system :(

  14. Beel
    Member
    Posted 10 years ago #

    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).

  15. Anonymous
    Unregistered
    Posted 10 years ago #

    Beel, I still doing the layout, but it's ok.
    http://mafia.yi.org/blog
    The HT stills not working.

  16. Beel
    Member
    Posted 10 years ago #

    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...

  17. Anonymous
    Unregistered
    Posted 10 years ago #

    :) THanks a lot... Will wait for your "solution"

  18. Beel
    Member
    Posted 10 years ago #

    I think this is an old problem - the google highlight does not work on searches which return a single post. Try a search using a word like "esta" which will return more than one post.

  19. Anonymous
    Unregistered
    Posted 10 years ago #

    Works fine!!! THanks a lot :)(

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.