Archive for WordPress
08.23.05
Posted in WordPress at 11:30 am by Nicholas
Operating on the theory that most people who come to my blog don’t particularly care when something was posted, but focus rather on the subject matter, I’ve eliminated all links to date-based archives and inserted a tag cloud into the sidebar. This has the additional benefit of trimming the length of my sidebar significantly, making it somewhat more likely that people will notice stuff like the AJAX poll. Another cool feature: in addition to clicking on a tag to see posts on that subject, you can view tag intersections with just a little bit of manual effort. The format for tag intersections is http://www.acetylene.net/tag/tag1+tag2: for example, apple+podcasts. Maybe sometime in the near future I’ll work up a way to do that without having to type anything into the address bar.
The plugin I used to add tag support to WordPress is Ultimate Tag Warrior. This description of the process was a big help, too.
Permalink
07.14.05
Posted in WordPress at 10:13 pm by Nicholas
New feature alert: there’s a poll in my sidebar using this plugin. You can add an answer if none of the default choices look good to you, and when you submit your answer the poll will refresh without reloading the entire page. It’s pretty slick.
Of course I had to do a Tour de France poll, because I’ve been eating up OLN’s coverage since it began two weeks ago. I’m not much of a sports fan usually, but I’ve been hooked on the Tour for several years now — helped along, naturally, by the amazing performances of Lance Armstrong. I’m betting on him for a seventh straight win this year, but he’s had some competition from some unexpected corners — Valverde, in particular, has surprised everyone with a very respectable performance.
Update: I heard a rumor about this just minutes after posting last night, but today it’s confirmed: Valverde has abandoned the Tour due to knee problems. A very good performance, though, and since he’s only 25, he’s got plenty of Tours ahead of him.
Permalink
05.10.05
Posted in Web Building, WordPress at 8:26 pm by Nicholas
So I’ve finally started the switch to WordPress 1.5, largely at the behest of my dad. I haven’t upgraded his site yet, though, because I found out in the process of upgrading my own that version 1.5 uses themes — which is great, and terribly convenient, but makes upgrades a bit troublesome if, like my dad, you’ve gone to all the trouble of making fancy custom templates featuring carefully arranged family photos.
So I’m waiting to find out what he wants to do about that, and also I’m going to have to figure out what I want my own blog to look like now. I had been using a few lightly modified WP 1.2 templates I found somewhere, and in my haste to get rid of the default look I’ve now switched to an overly-elaborate WP 1.5 theme, but I’ll try to come up with something a bit more “me” in the near future.
Permalink
02.20.05
Posted in WordPress at 4:46 pm by Nicholas
I’ve been using SpamKarma to fight comment spam on this blog, and it’s exceeded all of my expectations — thus far, it has caught every attempt at comment spam while yielding absolutely no false positives. My only complaint is that it has no real effect on trackback spam: there is experimental support for trackback spam filtering, but it hasn’t worked for me. One particular spammer has hit me once an hour, every hour, all day today.
But I managed to find, via this post on BloggingPro, a link to a trackback host verification plugin for WordPress. It compares the IP of an incoming trackback to the URL linked in the trackback, and if they don’t match, it puts the trackback in the moderation queue. Since most spammers submit their trackbacks from open proxies, and not from an actual working weblog, this should be enough to eliminate the vast majority of trackback spam. Pretty slick — makes one wonder why this isn’t a standard feature in every weblog system that accepts trackbacks.
The site the plugin is on is in German, but the plugin itself is in English. To install, just download the plugin file, change the extension from phps to php, and drop it in your plugins directory (from the WordPress root directory, it’s at wp-content/plugins/). Then, from the WordPress root, open up wp-includes/functions.php, find the function definition for trackback_response, and comment out the last line, die(); (that is, change it to // die();). Finally, go to the Plugins page in your WordPress control panel and activate the Trackback Host Verification plugin.
Permalink
01.25.05
Posted in WordPress at 2:27 pm by Nicholas
I use WordPress as my weblog engine these days. I also use the Textile humane web text generator for formatting. WordPress comes with a handy Textile 2 plugin, which works beautifully. Unfortunately, it completely ignores RSS and Atom feeds.
In other words (as some of you may have noticed), reading my blog in an aggregator until recently yielded you the raw, unformatted Textile markup, not the beautiful, humane, formatted text. Links didn’t work, nothing was bold or italicized, and things just generally looked awful.
Turns out there’s a very simple fix — all you need to do is add two filters so that outgoing feeds are parsed by the Textile plugin. But if you change the original plugin file (textile2.php, located in your plugins folder), your changes will be overwritten if the textile plugin is updated. And you don’t want that.
Instead, you want to use a my-hacks.php file. The details are on the wiki and in this support thread, but here it is in a nutshell: make sure the “Use legacy my-hacks.php support” option (under Options -> Miscellaneous) is checked. Then create a file in your root folder called my-hacks.php (with permissions ensuring the server can read it) containing the following code — and only this code. Extra lines before and after the PHP code block can and will foul things up, so make sure there are no blank lines or other garbage in there. Also, please note that I’ve only tested this on WordPress 1.2, because that’s the only version I’ve ever used as of this writing.
<?php
add_filter('the_content_rss', 'textile', 6);
add_filter('the_excerpt_rss', 'textile', 6);
?>
Unfortunately, as mentioned in the support thread linked above, this will create another problem: Atom feeds won’t validate because they have a mode="escaped" attribute on their <content> and <excerpt> elements, and that mode conflicts with the XHTML entities that now appear in our Atom feed. The fix for this is a little bit messier: open up wp-atom.php and delete the two occurrences of the string mode="escaped". You’ll note that we’re not using my_hacks.php here, so the next time you update WordPress, this change will be lost and you’ll probably need to do it again (unless, of course, the next version of WordPress fixes the problem).
The result should be nicely formatted RSS feeds for your loyal readers. Also, note that although the name of the filter only mentions RSS, this hack does work on Atom feeds, too. Enjoy!
Permalink