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…
- Textpattern Resources
- TextBook
- The Textpattern Forums
- Jon Hicks’ TXP notes, Pt. 1
- Jon Hicks’ TXP notes, Pt. 2
- Joel Dueck’s Textpattern Semantics
I regularly post new TXP links to my del.icio.us 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!