/* ------------------------------------------------------------------------ Plugin: Search_Highlight v1.2.0.2 ------------------------------------------------------------------------ Changes: 10/02/08 - Strip_tags added to avoid sql injection and XSS. Use of $_REQUEST 01/03/07 - Added fies/updates from forum from users mikkelwe/identity (better highlight replacement, additional div around term/removal message) ------------------------------------------------------------------------ Description: When a user clicks on the link from the AjaxSearch results the target page will have the terms highlighted. ------------------------------------------------------------------------ Created By: Susan Ottwell (sottwell@sottwell.com) Kyle Jaebker (kjaebker@muddydogpaws.com) ------------------------------------------------------------------------ Based off the the code by Susan Ottwell (www.sottwell.com) http://modxcms.com/forums/index.php/topic,1237.0.html ------------------------------------------------------------------------ CSS: The classes used for the highlighting are the same as the AjaxSearch ------------------------------------------------------------------------ Notes: To add a link to remove the highlighting and to show the searchterms put the following on your page where you would like this to appear: Example output for this: Search Terms: the, template Remove Highlighting Set the following variables to change the text: $termText - the text before the search terms $removeText - the text for the remove link ------------------------------------------------------------------------ */ if(isset($_REQUEST['searched']) && isset($_REQUEST['highlight'])) { // Set these to customize the text for the highlighting key // -------------------------------------------------------- $termText = '