The return of the site search function

domesticat's picture

At last…after far too many months without one, I’ve finally written and made available a search function for the entries on cat.net.

True, anyone can have a search function, and normally it wouldn’t be that big of a deal now to announce one (especially since there are plenty of places like Atomz and whatnot that provide this service for free), but it means a little more when you sat down and wrote it yourself on a Sunday afternoon.

Currently, the search function will only search entries on cat.net. I have plans to eventually build a bit more complexity into the code, so that you can choose to search either entries or comments (I suspect that doing both may be … entertaining) and perhaps boolean bits and whatnot.

Ah, well, it’s a start. Go forth, search, conquer, play. Etc.

(Those of you using a skin with a customizable sidebar can click the “edit my sidebar options” link to be taken to the page with all available sidebar options.)

Kevin's picture

There's deffinatly something gratifying about writing your own code. I spent 3 days writing a commenting feature for my blog -- the code which i wrote for myself as well. God. The first day I spent wondering why it wasn't working, and then i realised that i forgot to modify the function that printed the entries to look for the comments. Then I got them working, at least, the comments were being displayed. Then I had to fix the edit-entry deal so i could edit the comments. There's deffinatly alot of redundancies and things that could be improved in the code, but i'm still basking in the glory of writing 10 lines of code, saving it, and then not seeing the infamous and evil "parse error." One of these sundays I'll have to sit down and clean up the code. Fortunatly, this sunday is not that sunday, and that sunday isn't scheduled around anything resembling now.
canspice's picture

Sweetness. I've always just bitten my tongue whenever I've tried to search for something here. =)
jowilson's picture

Why not do a "keyword site:domesticat.net" on google? That's how I find things on my page. For instance, "ro-tel site:domesticat.net" finds me Joy's Spinach Dip and Hamburger Vegtable Soup. (To answer my own question, I just thought of a problem. If part of what you're searching for is on every single page then you'll come up with a lot of useless results (for instance, doing a search on 'code fu' doesn't just bring up stuff about code-fu, but photoshop-fu and smack-fu and anythingelse-fu because "code" is on every page, and so it picks up the extraneous fus. Of course, putting quotes around code fu in the search will bring back the right results.)
gfmorris's picture

Yeah, now we don't have to use Google. I use Google to find stuff on my sites as John suggest, but that's because, well, I'm lazy and would never write in my own search engine. /me chuckles
domesticat's picture

I admit I've been sitting on this one for a while. I'd hoped that I'd come up with an easy solution for searching entries + comments + the external pages on cat.net, but that hasn't happened yet. I know how to do it, but I just haven't gotten around to making the table changes and whatnot to start the groundwork for it. I've also had an entries-only search function in the admin interface of Quarto for a while, so my immediate need was slaked. The search engine was the last big thing that I needed to have written prior to moving geek-chick.net over to Quarto. Now I have to be patient and wait for Gareth to fit me into his script-writing schedule to get the import script for g-c written. (Explanation: there's already one import script written for Quarto, but it assumes all entries are by the same author. This is not the case with g-c.)

Post new comment

User login

Recent comments

  • Anonymous 3 days 11 hours ago [view]
  • Charli 2 weeks 3 hours ago [view]
  • quiltmom anna 3 weeks 3 days ago [view]
  • rslatkin 3 weeks 5 days ago [view]
  • Donna 3 weeks 6 days ago [view]

Search

Hello, anonymous!

If you're seeing this, you're not logged in. A lot of content here is only visible if you're logged in, and comments by anonymous users are held for moderation. Consider getting an account to save yourself some frustration?

domesticat.net

is the home of Amy Qualls-McClure since 2000. She is a Drupal / quilt geek in Huntsville, Alabama. One spouse, two cats, no kids, lots of opinions.

Public account for work and Drupal stuff: Private account for friends and personal life:

me on plurk me on drupal.org my music habits on last.fm my photos on flickr my bookmarks on del.icio.us my bookmarks on pinboard.in Amy Q. on foursquare what I'm reading

Some content is locked. Copy these links AFTER logging in for a query string giving you full feed-reader access:

Atom feed, entries RSS feed, entries RSS feed, comments