September 2007 Archives
Based on a request made on Pronet this evening, I whipped up a little plugin to run incoming search requests through the junk filtering mechanisms provided by Movable Type.
Grab it here: http://rayners.org/plugins/SpamSearch-0.1.zip
Enjoy!
So I did a little more testing, and my original technique as written will not work with Entry Archives. But, with one minor change to the Header template module, things will work just fine.
First of all, let me start of by saying that Javascript is not exactly a specialty of mine. I’m competent enough in it, but I’m sure there are folks out there that could implement this much better than I have.
So, on with the show then. Some of you who have been around MT for a couple years now might remember MT-RefSearch. It was, and appears to still be, PHP and MySQL only. Since I use neither of those for my site, it hasn’t been an option for me.
But I have managed to implement it with simple Javascript and a new search template so that it will work for any MT configuration out there (I have only tested it with MT 4 though).
None of the existing media-based plugins fit my own personal needs, so I decided to write MediaConsumer. The key feature of MediaConsumer, for me at least, is the amount of data that is stored locally, and thus available for use and manipulation in template tags:
- Release/publish date
- Thumbnail URL
- Detail URL
- Consumation status (‘to be consumed,’ ‘consuming,’ and ‘consumed’) and dates of start and finish
- Reviewed or not
So, as an example, here is one particular use case I wanted to be able to make use of in my reading blog: listing the Hugo award winning (tagged ‘hugowinner’) novels (type ‘book’) I have read (status ‘consumed’) in order of publication (sort_order ‘ascend’, sort_by ‘released_on’).
<ul>
<mt:medialist type="book" status="consumed" tag="hugowinner"
sort_order="ascend" sort_by="released_on">
<li><mt:mediaitemtitle /> by <mt:mediaitemartist />
(published: <mt:mediaitemreleased format="%Y" />)</li>
</mt:medialist>
</ul>
It’s still very much in the development. It probably won’t work, it may destroy your site, or drive you to read more. New features are already in the works (e.g. adding ‘reviewed=”1”’ to mt:medialist will limit the items to only those that have been reviewed). Give it a shot if you’re up for it. Let me know what works, what doesn’t, and what you’d like to see. Enjoy!
Get it here:
