Live Search module for Drupal 5
is was approaching its 5.0 release, Jared of littlegreencube brought my attention to the lack of decent live search functionality for Drupal when he saw my article on live search in Drupal. The word "hack" can't aptly describe how much of a kludge my previous attempted approach to live search for Drupal 4.7 was.
- To specifically target Drupal 5.0
- To utilize jQuery
- To tap into the existing search.module API instead of reinventing the wheel
- To provide portability and flexible settings
To separate live search into a module was apparently the right direction. Because of this, the live_search module depends on the search module.
After 4 days of hacking and reading the Drupal API reference feverishly, I'm finally done with the module in question. Sure, it took time, but a good read on Drupal's function hook mechanism helped a whole lot more. Drupal API reference is a very good resource for Drupal developers of any kind, and I can't imagine writing a module without it. Peeking other modules' source code also helps people to get a grasp of the whole idea.
Yes, I am dogfooding this now.
This module depends on search.module. Enable the Search module first and let it index your site if you haven't done so. Needless to say, this module only works on Drupal 5.0.
This has been tested on Drupal 5.0 and works on the following browsers that I have tested:
- Firefox 2.0 (of course)
- Opera 9
- Internet Explorer 6 (surprised?)
- Safari 2
This site is now upgraded to Drupal 5 and it's of course dogfooding my very own live search module. Everything looks nice and well.