LiveSearch 1.2 Creative Commons License

posted mid-afternoon by Constantinos. Filed under Code, WP Plugin

This post was originally published in 2006
The tips and techniques explained may be outdated.

Ok. I’ve widgetized this plugin, and updated the headers of the plugin. Now you can just install it, and put it anywhere on your sidebar using the Widget plugin. In its options you can specify whether or not you want the searchbox to be encompassed in the default widget wrappers (disabled by default). Pretty straight forward.

The css still needs to be updated, but I don’t know if I’ll be getting to that anytime soon. Any upgrades/suggestions anyone might have are more than welcome.

Here is a quicklink to the zip archive. Original files are always linked from the main LiveSearch post.

16 Responses to “LiveSearch 1.2”

  1. 1. Comment by manuel
    on 29 May 2006 @ 12:03 pm · Quote #259 ·

    first off let me thank you for your part of the work 🙂

    livesearch seemed to be tricky, but your plugin was just install and voila. cheers! but i have one question tho’: i am trying to fiddle out how to apply a custom background image to the searchbox (i dont like it that it looks good in safari but awful on IE.

    any clue buddy?

  2. 2. Comment by Constantinos
    on 29 May 2006 @ 1:08 pm · Quote #260 ·

    but i have one question tho’: i am trying to fiddle out how to apply a custom background image to the searchbox (i dont like it that it looks good in safari but awful on IE.

    Well, for this you’ll need some clever CSS. There’s no real formula you can apply here, just trial and error, depending on what it is you’re looking for exactly.

    The general idea for styling search boxes with background images is this: First use css to clear the borders of the search box completely. In other words, make it completely white, so you have a clean slate to work with. Next, you need to create 3 separate images: The left border, the right border, and the middle image (which is usually 1px wide, and repeats).

    From there, things get a little bit tricky. You’ll need two elements in addition to your searchbox. One element will have to be attached to the left side of the box, and the other to the right. the corresponding images are then set as background images for each box, with the appropriate positioning and repeating.

    The issue is cross-browser compatibility. There’s a lot of difference in the way various browsers render css spacing and positioning, which obviously causes problems, since you want your box to be consistent no matter what browser each visitor is using. Unfortunately I have no time right now as I’m drowining in the last few days of my thesis. If you’re willing to wait a couple of weeks though, I’d be more than happy to work at it with you and maybe come up with a solution that I could standardize, and maybe even throw in a plugin? 🙂

  3. 3. Comment by manuel
    on 29 May 2006 @ 4:54 pm · Quote #261 ·

    holy crap, thats a nice offer! 🙂

    hope your thesis will be a blast for them! sure thing, i have plenty of time to wait. just had two days off and that why i had time to play around a lil.

    righto- i totally forgot that i could edit the border and background of the searchbox!
    the left middle right thing cant be such a biggie. i am sure this can be solved, even crossbrowser compiliant and good looking 🙂

    plugin would rock as well, one for ordinary WP searchboxes, and one for your livesearch plugin.

    hope to hear from you and all goes well!

  4. 4. Comment by Dan Butcher
    on 12 Jun 2006 @ 5:42 am · Quote #271 ·

    Love the live search plugin! Works exactly has I hoped. One question: the “arrow keys and enter” “close” text is really small, but I can’t figure out what in the css controls that. Any suggestions?

    Thanks,
    Dan

  5. 5. Comment by Dan Butcher
    on 12 Jun 2006 @ 5:53 am · Quote #272 ·

    Figured it out–I’m using your plugin with K2, because the built-in live search doesn’t seem to work. There were styles coming from 2 stylesheets; once I changed the size of the LS small to 1em, it was fine.

    Dan

  6. 6. Comment by tomshiii
    on 25 Jun 2006 @ 5:19 am · Quote #280 ·

    hi,

    thanks for this great plugin!!!

    but i can’t get it to work, it’s always no results, even when directly calling the xmlhttpreq url with a ‘s=searchstring’ parameter…
    trying the same on your site, it works…

    it seems like there is an empty $posts variable in livesearch.php (yes there are posts :-), and i don’t know wordpress too well to find out what’s wrong here and where the DB search is actually called…

    the ‘regular’ search when pressing ‘more results’ is working though.

    i’m running on wordpress 2.0.3 with livesearch as plugin…

    any help will be highly appreciated
    🙂
    cheers, thomas, vienna, austria.

  7. 7. Comment by tomshiii
    on 25 Jun 2006 @ 5:21 am · Quote #281 ·