Live Search Plugin
I first remember seeing a live search used on Dunstan Orchards 1976Design and thinking that it would be a great feature to have on a Textpattern site. Apparently, Markus Kniebes worked it all out a few months back and posted it on his site. The topic came up today and someone mentioned Markus’ work so I took a look and decided that it would be a great candidate to be pluginized.
The rss_live_search plugin encapsulates all of the files necessary for live searching into a plugin. The original live search extension is based on the BitFlux LiveSearch Solution which uses XMLHttpRequest to send the requests to the server behind the scenes. This allows for search results to be displayed in real time as the user types into the search input field. Take a look at the search box at the top for an example.
I did make some updates to the original live search extension for the new permlinking in RC3 and also added the ability to control some behaviors of the search. All of the options are detailed in the plugin docs. The installation should be a snap and you’ll be off to live searching.
Comments
6. May 2005
That’s a really neat feature plugin. Maybe you could place an obvious “Close |X|” link or a faded hint “press ESC to abort” somewhere in the box?
Speaking of plugins, how do you “compile” your plugins for distribution and installation? Do you stick to the stock template in the forums, or is there a more convenient option you prefer?
Thomas Stache
6. May 2005
Once again you are my hero, Rob! :)
Did install the LiveSearch (textpattern.kbbu.de) and it works great in FF and IE6 – not though in Opera 7.54. It takes a bit till the javascript is through but hopefully people get used to it. Livesearch is not so commen.
Thanks again for this wonderfull Plugin.
7. May 2005
Oh Mama! Awesome, I tried to do this the hard way in TXP and gave up… you are my Hero for at least the rest of the week! :)
Thank you!
7. May 2005
Just a little feedback, I had to switch the rss_suparchive plug-in off then back on to get it working again after I installed this. But I was messing with the code a little. :)
7. May 2005
Great;) Much more easy to install than my snippet. I havw been too lazy to do the plugin stuff…
7. May 2005
This is really cool. I was looking through my logs, though. And I realize that everything I typed in the search field shows up in the log as a seperate “entry”.
Is this normal? Is there a way to “fix” this?
8. May 2005
Well, i don´t mind loggin the search phrases at all. Actually this is kind of interesting.
8. May 2005
Brian – I noticed the same thing. It is normal because each for each letter typed into the search field a request is sent back to the webserver. If you want to stop counting these you can add a check to the code so that hits are only counted if there isn’t a query parameter called “ls”. For example, I added if(!gps(‘ls’)) { //count hit }.
Markus – Thanks to you for putting this all together in the first place.
John – Very odd. Don’t know why that would be. But as long as it works now…And let me know when my week is up.
Thomas – I use and would recommed zem’s plugin template.
I’ve received a bunch of suggestions for enhancements to the plugin so I’ll be playing around with some of those soon.
30. August 2007
I am still having trouble getting the plug in to work with the /year/month/day/title URL scheme.
I get the 1969/12/31/ problem.
Any ideas? I have superarchive disabled. I have uninstalled and reinstalled the plug in entirely.
Switching to any other scheme resolves the issue but breaks all my old links and I am not an apache RewriteEngine superstar.
Any help appreciated.
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.
