Wednesday August 3, 2005

What's New? Search Me!

I’ve been procrastinating the day I’d finally buckle down and get the search feature on this site smoothed out and functioning the way I want it to. At first I let it slide, letting Textpattern handle search results in its admittedly awful way. By default, Textpattern returns search results to the default page template and inside the <txp: article /> tag. In layman’s terms, that would place the search results for this website on the Home page, replacing the Recent Articles list with the search results. Not cool—or usable.

Thank goodness for Textpattern pioneers. A quick search over at Textpattern Resources returned an article by Justin French that essentially did all the work for me. The only other file I “hacked,” beyond the files mentioned in Justin’s tutorial, was /lang/en-gb.txt. This file holds a plethora of Textpattern’s default textual output. In my case, I edited Line 22 to read "articles_found => results were found lurking in the shadows.." You’ll see the altered text if you do a search. Editing portions of /lang/en-gb.txt will put a little more personality into what otherwise end up being generic messages1.

I don’t know why on earth anyone would want to search this site, but it’s now there if you need it. I really wrote this to call attention to the great collaborative effort being made in the Textpattern community. The power of free resources and information is a testament to the true value of the internet. I get the occasional email asking me for Textpattern-related advice or “how did you do that?”-type questions, and I’m always happy to assist where possible. There are, however, many burgeoning resources out there that have bailed me out on many an occasion. So for those about to Textpattern…

I regularly post new TXP links to my account when I run across them, so take a look in there every so often for new resources. Enjoy!

1 Update: Textpattern 4.0 does not use en-gb.txt by default. To activate it, and run your language settings off it, go to Admin > Preferences and click on the “Manage Languages” button. At the bottom of that page is a link that says “Install from file (experts only).” Yes, you’re an expert. Click the link. On the next page will be an entry labeled “English (GB)” and an “Install” link to the right. Install it and watch the text file update all of your clever customized messages!


Gerard McGarry » 5892 days ago #

Jared: I didn’t realize you were using TextPattern for your content management. You’ve managed to get it looking very good.

I’m a WordPress obsessive, because of the excellent templating system, but TextPattern might be worth a second look! How many other blog systems, besides WP and TP are free these days?

Matthew Pennell » 5892 days ago #

Don’t forget also:


Alan » 5891 days ago #

My search pages took forever to set up. The worst part was the forward/back links in the results were totally screwed up because WordPress only barely manages handling only showing x days, instead of x posts.

As a result, the ‘previous x posts’ link never worked, and I had the same result in archives. I finally had to just give up and set it as x posts instead. Sigh.frb

Jared Christensen » 5891 days ago #

Matthew - The Hicks train never stops rollin', does it? Thanks for those links!

Alan - What’s this??? A fault with WordPress??? ;)

It seems that every CMS/blog package out there today has its limitations, bugs, headaches, and missing features. The cool thing is that there’s almost always someone out there who’s willing to volunteer the time and resources to patch it or fix it.

Pierce » 5891 days ago #

Yeah. Someone else. Hahaha.

Jared Christensen » 5891 days ago #

Gerard – Sorry, didn’t mean to ignore your question. I honestly don’t know. I’ve only had exposure to WP, TXP and (yuck) MT. Of all 3, you can see which one fit me best. :)

« Older writing is available in the Archives.