HOWTO: Implement Site Search ?

Discussion in 'Web Design and Development' started by sk3pt1c, Jul 3, 2009.

  1. sk3pt1c macrumors 6502a

    sk3pt1c

    Joined:
    Nov 29, 2005
    Location:
    a simulacrum
    #1
    ok, so i have a site that the client wants a search feature on, how would i go about doing it?
    there won't be a database to search, just the html content i imagine, and there may need to be specific pages set for the search feature to scan, not the whole site.
    i've seen google custom search, is it worth it? can i style the search field with css to make it fit in my site?
    thanks
     
  2. angelwatt Moderator emeritus

    angelwatt

    Joined:
    Aug 16, 2005
    Location:
    USA
    #2
    I use the Google Custom Search on my site. You can get there through my profile. Then you can see it's pretty well integrated into my site design. The only thing I hated about it is that it's encapsulated into an iframe so I can't change the width very well for a more fluid design. Not a huge pitfall, but for someone who likes total control it's a little annoying.

    It's nice being able to use Google since it's search algorithms are so powerful. You won't find anything that can match it, but you might find something that's good enough. I wanted to make my own, but that's time consuming.
     
  3. sk3pt1c thread starter macrumors 6502a

    sk3pt1c

    Joined:
    Nov 29, 2005
    Location:
    a simulacrum
    #3
    yeah, looks fairly decent on your site, i guess i'll do the same...
    does the iframe autoexpand with the results or do you just leave the page blank and it fills it up?
     
  4. angelwatt Moderator emeritus

    angelwatt

    Joined:
    Aug 16, 2005
    Location:
    USA
    #4
    It'll fill vertically on its own depending on the number of results, but it has a static width, I think 600px on mine.
     
  5. sk3pt1c thread starter macrumors 6502a

    sk3pt1c

    Joined:
    Nov 29, 2005
    Location:
    a simulacrum
    #5
    600px is fine, that sounds cool, so did you customize it using the API from google?
     
  6. angelwatt Moderator emeritus

    angelwatt

    Joined:
    Aug 16, 2005
    Location:
    USA
    #6
    Yea, there's a few things you can customize like the colors. I changed the width from the JavaScript code they gave.
     

Share This Page