Live Search is a list of matching keywords extension to CMSimple searchbox and to CMSimple plugin Advanced Search. You can test it together with advanced Search by searching on this site.
Table of Content
- Licens and purchase
- Known problems
- Future development
1. License and purchase
Download and uncompress the fil livesearch.zip Upload the entire livesearch folder to your "plugins" folder. When uploaded the Livesearch can be used as it is, but for optimum results please read configurations section.
Livesearch is basicaly a list of keyword extracted from a web site and requires maintenance each time the content of your site is updated.
Updates can be initiated by saving your pages or by plugins that create own content such as "simplerss". Livesearch can handle both situation by changing vaues of configuration variable: livesearch_keywords_create_onchange. If true the list is refreshed only when the content of the website is changed by admin. If false the list is refreshed once for each user session.
By default the list is refreshed during the load of the first page, which is not particularly desirable. The load performance can be significantly improved by adding a call to livesearch at the end of template file (template.htm). Insert <?php livesearch(); php> just after the last line containing</html> and change configuration of variable keywords_create_from_template to true.. It ensures that the list is created after the page is loaded.
The content of livsearch list can be controlled as well. The variable keywords_search_all controls whether the list contains keywords that match start of the query string or a query strig is a part of the keyword.
The variable list_minchars controls how many characters a user must type before Livesearch creates a list..
To reduce redundancy the Live Search plugin uses a php function similar_text. The configuration variable similar_text must contain a similarity percent used by php function similar_text. To obtain the best value you can study the log created by Livesearch plugin.
Further, the list height and width can be configured. By default corresponds list width to the width of the search box, but can be overwritten.
Tested in CMSimple_XH ver. 1.7.2
Removed configuration variable $plugin_cf['livesearch']['icon'] because it causes conflicts on the iphone and ipad
PHP 7 and CMSimple XH 1.7 ready
If the site uses jQeury-ui then jquery-ui code must be laoded before livesearch. The easiest way to do it is by changing configuration of jQuery plugin to autoload of Jquery and jQueryUI.
Datalist functionality is based on Ajax Autocomplete for jQuery, version 1.2.4 by Tomas Kirda.
This CMSimple plugin is distributed in the hope that it will be useful - without any warranty; without even the implied warranty of fitnes for a particualr purpose.
© simpleSolutions 2013-2018.
CMSimple plugin: Tooltip and Modalbox © simpleSolutions