Main menu:

Site search

Categories

Archive

Search Hints (Suggestions)

My last post was rather cryptic. I actually intended on updating it or posting again regarding what I made but other things came up and I forgot. The reason for the cryptic post was partly due to the time of the post (at 4am) and party due to the fact that I wasn’t sure if the “thing” that I made actually worked.

What is it?

Last Sunday I made an add-on to the MovableType that makes suggestions for search queries as you type. It’s modeled after the Google Suggest search that came out last month. I wrote all of the code from scratch and stayed up most of the night putting it together.

How does it work?

Every time you search for something that has never been searched for before the hint system saves the query in the database. When the query is written it also writes the number of results that were returned. The next time a search is being typed that is similar to a previous search the hints are displayed below the search box. You can use the up and down arrow keys to select previous searches and then hit enter to accept the suggestion.

Can it be installed elsewhere?

Sure it can be! If you are interested in testing it out for me I would be grateful. It’s just a few files and only requires one table either on your MySql MT database or in another database. (Sorry, it only works with MySql installations of MT right now.) Post a comment if you would like a copy.

Do you like to program?

I know I do. :-) If you are interested in helping me out with this and you know PHP, Javascript/DHTML, and CSS pretty well then I would be happy to have your assistance. It would also help if you use MovableType as your blogging system but I suppose that’s not required. Again, post a comment if you’re interested.

Using Internet Explorer on Windows?

I developed this entirely on my Powerbook and I have not had a chance to test it on IE yet. All of the code is there for IE but I don’t hook the events in Javascript because I’m not sure how or if it works. Most likely it will be fine with maybe an alignment issue or two. As long as you’re using Firefox on Windows it will work as expected.

Comments

Comment from Brad
Time: January 13, 2005, 11:14 am

Eric,
it does not work on IE 6.0 -that is waht I am using on my laptop- but I do have FireFox on my PC at home, so I will give it a go there -I have not been homein a few days-. I like the idea alot. You may find this interesting at tummymonsters.com she has a live preview in her comment system which is pretty slick.
Cheers

Comment from Eric
Time: January 13, 2005, 11:19 am

Brad,

I know it does not work on IE6 yet. The way it installs on a text box (the search box) is it hooks the keyup event. I have a conditional statement that says, “if it’s not Firefox, don’t hook the event.”

I look forward to hearing your thoughts on it when you get home to your desktop. You should install Firefox on your laptop though ;-)

Eric

Write a comment