The developer side of me gets a little giddy when I get to add new gizmos to the site, and so it’s that side of me that’s happy to announce the addition of a Rollyo search box on the archive page. I’ve been toying with the idea of adding some kind of search function to the site for some time and just never did, partially because the plugins I was trying didn’t work. I think has to do mainly with this site not playing with the WordPress templates.

Regardless, Rollyo offered a simple to implement and unobtrusive solution to my dilemma. Once you’ve signed up they have an area where you can fill in a simple form and have the appropriate code generated. While the pre-made ones look nice enough (example here, kind of), the dropdown menu (for site selection) bothered me as it really doesn’t serve a purpose. Rather than try to figure this out on my own, I looked to a site that uses a version similar to what I wanted: Airbag.

It took me a minute to figure out what data the form was using to tell it what site to search, and it turns out it’s this:

<select name='sid' style='display: none;'><option value='65987'>andylaub.com...

The highlighted number is basically the ID assigned to the site that you’ve added (for some perspective, Airbag’s number is 7080). In the standard dropdown menu it can handle multiple user-defined sites, each with its own number but in this usage only the one for andylaub.com is necessary. Also of note is the style attribute in the select tag which keeps the list from being shown at all; with only one option there’s no point in having it visible.

That’s it in a nutshell. I’m pleased with the result for now, at least as a stopgap, as it makes older stuff easier to find until I can create a more comprehensive and organized archive. The only issue I’ve noticed is the time it takes to index new pages, so putting in “Madonna,” for example, wouldn’t turn up the post I wrote Saturday (yet).