Highlight Plugin

Highlight plugin for Mango Blog 1.3+ to highlight keywords from searches using jQuery. jQuery is not an included file with this plugin. I recommend installing the jQuery plugin for Mango Blog.

Plugin version:
1.1
Last Updated:
June 13, 2009
Requires:
Mango Blog 1.3+
Auto-install URL:
http://freerksen.googlecode.com/files/mango_highlight_1.1.zip

It’s always bothered me that Mango Blog doesn’t highlight the keywords that you searched for. It’s nice to highlight the keywords so you know if the post is in the context of what you are looking for. So I decided to do something about that.

Through the settings section of the admin, you will be able to change the class selector(s) to highlight keywords in. That is the tough part. You will need to know a little about your skin to set the class selector. If you are using Firebug, it makes it easier to go through and inspect the page to find the class names. The default value is “.post” which might also highlight the authors name, date, or tags associated with the post depending on the keywords searched for. If you do not want it to highlight the date, author, or tags, you would simply specify multiple selectors. For example, if you are using the GlossyBlue theme and you only want to highlight keywords in the post title and the post body, you would enter “.post-title h2, .entry”. This would only highlight keywords found in the title and bost body and not anything from the tags, date, or authors name.

You are also able to change the stylesheet for through the admin.
This involves the use of CFFile. If your host does not allow you the
use of CFFile, you will not be able to use this plugin. Of course, if
you have Mango Blog installed, you probably have access to CFFile.

This site is currently using the Highlight plugin. For an example, search for “flash” or click here.

History:
090613 – Plugin started and completed. Initial release.
090613 – Revised Javascript on Handler.cfc to look for the search term in the directory type listing rather than just a query string. Until I can build a RegExp to do this, it is looking for the specific string.

There are no comments

Add a Comment

Allowed tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="">