Tag Archives: search_query

OPML to RSS

We’ve got a single OPML file containing the links and feeds of every 2006 Gnomedexer, thanks to the code sleuthing of Kosso. This is good for importing “everybody” en masse into your news aggregator. However, it’s not always as efficient as a single feed. So, Shayne whipped out a 400-line script to convert OPML to RSS – and I think we’re going to call it “KissMyOPML” for fun. The PHP script will be open source, available for everybody soon, and is also a sign of things to come in the near future with Gada.be (which will mash feeds faster than the average install). Remember, Gada.be outputs OPML for every search query; think about it. You can subscribe to the Gnomedexer feed immediately – and if your name isn’t listed in the conference attendee OPML, please let us know ASAP so we can get the proper information in there.

OpenSearch RSS AutoDiscovery for WordPress Searches

I started to compile a “wish list” of WordPress plugins. Turns out, many of my wishes have already come true – it just took a little digging on Google. Too bad there’s not an amazingly comprehensive WordPress plugin directory / wiki (and if there is, nobody really knows about it yet). One of my wishes was for an OpenSearch feed. Turns out Williamsburger already created a plugin, with a WP 2.0 compatible version linked from his comments thread. This got me up and running with my own OpenSearch feed easily enough, but I wanted to have it actually be autodiscoverable within a search query. Without bothering anybody in my personal circle, I found the variables I needed to insert between at the top of my header.php template:

[php]< ?php if (is_search()) { ?>
< link rel="alternate" type="application/rss+xml" title=": < ?=wp_specialchars($s); ?>” href=”http://chris.pirillo.com/os-query?s=< ?=wp_specialchars($s); ?>” />
< ?php } ?>[/php]There you go. An autodiscoverable feed for your WordPress searches! Try a search on my blog for a living example. Couldn’t have gotten it done unless Shayne figured out what I was doing wrong within the .htaccess file. Ugh. I’ve gotta start learning more about Regular Expressions. FUN!