Search term highlighting on my site

Keith posted about his efforts to highlight Google search terms. This is interesting! I may be able to create a b2-prefunction that does the same for b2++.
Update! I modified my original highlightsearch() function, adding in most of the code found on textism.org which also fixes the problem of highlighting text inside html links! Woo!
Here’s a Google search for you to try. Hit the Holy Shmoly link to see the highlighted text!
Again, if you want to add this to your own blog, just edit post.tpl add add the highlightsearch modifier around $the_content:

{$the_content|highlightsearch}

You’ll then have access to lots of highlighted search results!

Comments

comments

Categoriesb2Tags

Leave a Reply