Live Search Plugin
If you’ve tried out my search form, you know what it does. It’s dead simple to use as well:
Usage
1. Download and install the plugin.
2. Make an empty template - I called mine livesearch - and put the tag in there:
{exp:live_search:results link="comment"}
3. Add the included css and js files to the page with your searchbox on it.
4. Tell the javascript where to go:
// The trailing slash is important
$('#keywords').livesearch('/search/livesearch/');
Pretty simple really. Style it to fit your site, and you’re done.
Parameters
link="comment” - In the original forum thread Paul’s link used the ‘blog url’ weblog path. I needed mine to go to the ‘comment url’ path. Easy fix - support both. It defaults to blog_url, but “comment” will make it go to your comment page.
I’m open to suggestions for more options.
Comments
#1 | Posted on July 29th, 2008 N. Haran said:
Is it possible to port this to the EE Dashboard?
#2 | Posted on July 30th, 2008 David said:
thanks for the plugin interesting…
it seems to only search titles. can you make an option to search for body text as well?
lastly, how do i integrate into the simple search commands in ExpressionEngine?
#3 | Posted on July 30th, 2008 Pascal said:
@N. Haran: I assume you mean doing this for the edit page? It’s definitely possible, but not quite as easy. A quick glance at the extension hooks for that form reveal nothing too helpful. EE2 will introduce dynamic filtering to the cp.
@David: yes, it only does titles right now. I definitely want to expand it, but with custom fields, searchable/non-searchable fields, and weblog permissions the query grows quite quickly.
You can still use the simple search form, but the plugin won’t adhere to those settings. Integrating it would be the easy solution to your first question, but it also comes with a considerable performance hit.
#4 | Posted on July 30th, 2008 Derek Allard said:
Pascal, nice work here! @N. Haran, take a look at Ajax edit tab, I’m not sure if that’s what you want or not… but may be.
Add a Comment