Live Search Updates (0.2)
After some more digging into XMLHttpRequest and the live search code, I’ve updated the rss_live_search plugin to version 0.2. In the tradition of rss_ plugins, a slew of options is now available to allow you to totally customize the search form and results. There were also several bug fixes and some general code cleanup involved. Aside from those that contacted me I also got several good ideas from the live search implementation at binary bonsai. If you’ve already installed version 0.1, I’d strongly recommend updating to the latest version.
Arrow Keys
One of the major changes in this version enables arrow keys to work as intended. Thanks to Cody Lindley for pointing this out. This means that when live search results appear, the up and down arrows will allow you to navigate through the list and the enter key will select an option from the list. If there are no search results currently highlighted on the list, the enter key will post the form as a normal Textpattern search.
HTML Structure
The search results output has been changed to a div based structure rather than the original unordered list to allow for more flexibility.
Textpattern Forms Support
The search results can be displayed using your own custom article form. If not using a form, the showdate and excerpts options can be used to show the article date and excerpt in addition to the title.
Search Form Customization
You have the ability to add a submit button, specify the button label, set a value in the input field and set the size of the input field. You can also turn off autocomplete on the input field.
All of the updated documentation can be found on the rss_live_search plugin page and in the plugin docs once you install.
Comments
10. May 2005
I’m having trouble with the “inputfield” value. I am getting something weird like “”search”. What’s wrong?
15. May 2005
Hi Rob,
I am just upgrading to this new version and tweaking a few bits but a common theme throughout the two is the oddness when you type 0 into the search form (that’s zero) try it on my site and watch my layout die! :)
Awesome plug-in none the less!!!
23. May 2005
Do you think the live search should be case sensitive?
cody
Cody Lindley
3. June 2005
Hi Rob,
I just thought I’d add a feature request, or indeed a “how to” request if I missed the obvious.
Would it be possible to have a view all results link at the bottom of the live search, which then takes you on to the standard search results page?
3. June 2005
Cody - From what I can tell, MySQL searches are case insensitive by default. This seems to hold true in all of my testing.
John - If you hit enter while the focus is still in the input field, the search form will be submitted as a normal search would and take you to the search results page. The extra link at the bottom of the search results would be easy enough to add in a future release.
21. September 2005
Hi,
I am still using the previous version of live search and I haven’t ran into any issues and bugs yet.
I was wondering as I know nothing about javascript, how should I change my script (or/and html) so I could see the text ( ‘Search’ or ‘Type here’) in the live search box.
Take a look at the script please, and let me know if you will: script
tnx
Add a comment
You may use textile in your comment. Gravatars are enabled. Your email will not be displayed and will remain private. I reserve the right to edit or delete comments.
