I’ve been playing around with Trackbacks this evening, trying to get them set up here in my blog. Trackbacks are an alternative way of commenting on blog entries. Instead of posting an actual comment on the entry, you write an entry on your own blog. Then you tell your blog software to send a “trackback ping” to my server. My server then automatically adds a reference to your entry on my pages. Nifty, eh?
Well, I’ve got it mostly working. Movable Type normally considers comments and trackbacks to be completely different things, but Adam Kalsey has written a new plugin called “SimpleComments“, which allows you to merge them into a single display.
There is only one slight problem. When someone posts a comment on a blog entry, Movable Type automatically rebuilds that entry. If you’re displaying comments in-line with the entry, this ensures that the comments actually show up immediately. But trackbacks don’t trigger a rebuild. (This is intentional behaviour, not a bug in MT. It does make sense: if your rebuild process takes a long time, then a person trying to send you a trackback ping may get a time-out before the rebuild is complete.)
If you’re using the standard MT popup dialog for showing comments and trackbacks, the rebuild issue is not a problem, because the popup dialog dynamically extracts comments and trackbacks from the MT database when it shows up. But I don’t like popups. I much prefer to see comments and trackbacks on the same single page as the original entry.
I’m reluctant to change all of my archive pages from static .html to dynamic script pages (e.g. PHP). I use slashforward URLs for all my permalinks internally, but unfortunately Movable Type doesn’t realize that, and whenever I’ve been leaving trackbacks behind on other people’s sites, the trackback URLs point to the actual page.
Other alternatives include installing a script that will automatically rebuild my MT archive pages every so often, or doing a manual rebuild whenever I get a notification email that someone has sent me a trackback ping.
I’m going to have to think about this one for a while. I suspect I’ll end up going to an automatic rebuild solution, but I’d like to find one that only rebuilds selected entries (i.e. only the ones with new trackbacks since the last rebuild) rather than the whole archive. We’ll see how it goes.
Yes… tricky question. I suppose you figured out how to include new trackback pings in your blog using PHP… On my site I do this:
php include(“http://domain.com/cgi-bin/mt/mt-tb.cgi?__mode=view&entry_id=<$MTEntryID$>“);
(and yes, you have to use the full URL, a relative one won’t work 🙂
But I understand that your archive pages are ending in HTML and you don’t want to mess up the trackback pings to those pages that you have send out yourself, right?
So, two possible solutions:
a) Convert to PHP and overwrite the HTML pages so that they auto-redirect to the correct PHP page.
b) drop a .htaccess file somewhere in your /archive dir and tell PHP to _also_ parse pages with the .html suffix.
Hope either makes sense in your particular situation 🙂
I’d considered using setting up redirects for all old archive files, but I hadn’t thought of the using an AddHandler directive to pump .html pages through the PHP engine.
The thing is, I like the way that Movable Type spits out static HTML files. It’s clean and efficient: the server does all the work when you create the page, but when someone requests the page, apache can just serve it up without having the overhead of parsing it. This is of greater importance to sites that get more traffic than this one, but I’d like to keep my pages as “pure” as possible. It just feels more elegant. 🙂
I think I have the same sort of idealistic (purist?) streak, but having wrestled with browser incompatibilities for way too long (again!) I’ve come closer to just wanting things to work, no matter how ugly the solution. It feels like a failure, but a failure that works is better than a failure that never gets implemented. Besides, PHP parsing on Apache really doesn’t add much of to the load. And even if it did, next year webservers will be twice as fast 🙂