Categories
Weblogging

Adding trackback entries to individual archive pages

I’m firing on all (one) cylinder today.

Sam Ruby references a citation at Simon Willison, who quotes Tantek:

 

“…we now have Trackback and Pingback to help automate generating comment hyperlinks to blog-on-blog commentary. While I certainly applaud these efforts at automating the plumbing, I must ask – why is there any distinction in the presentation? I ask because many blogs present separate and different interfaces for their comments, trackbacks, and/or pingbacks.

 

Good points. After all, these technologies are nothing more than threads to a communication.

For Movable Type, it’s fairly simple to make a modification to your individual archive page to list trackback entries along with your comments. I’ve made this modification to my individual archive pages and thought I would pass on the how-tos of my mod.

Warning: To implement trackback within the archive page following my prefered approach, I did need to make a minor modification to one of the Movable Type’s Perl modules, Trackback.pm. It’s a minor change: it forces a re-build of the archive page when a trackback occurs so that the new trackback entry displays in a manner similar to how new comments are added, automatically, to the page. You can download the modified file here and replace the in your MT directory (put it into /lib/MT/App/). However, you do so at your own risk. You can find the edits I made because I surrounded the edit with comments containing my name, ‘Shelley’.

Repeat: You do so at your own risk. This modification is not vetted by Movable Type’s creators, Ben and Mena Trott.

For those taking the leap of faith, to add the trackback entries to your individual archives, add the following to your individual archive template:

 

<MTEntryIfAllowPings>
<MTPings>
<div class=”comments-body”>
<a name=”<$MTPingID$>”></a>
<a target=”new” href=”<$MTPingURL$>”><$MTPingTitle$></a><br /><br />

Excerpt: <$MTPingExcerpt$>
Weblog: <$MTPingBlogName$><br />
Tracked: <$MTPingDate$><br />
</MTPings>
</MTEntryIfAllowPings>

 

Note that the re-build of the page does slow the trackback ping, and if the remote site is having performance problems, the rebuild may not occur. However, the exact same process is used with comments, so whatever performance problems we’ll have with comments, we’ll have with trackbacks. Additionally, malicious people (known as spammers) could exploit the ping to add trackback entries pointing to junk — but they can do this anyway with the existing system. Web services are vulnerable that way.

Other trackback embedding approaches are discussed at the Movable Type forum on a thread related to this issue. I didn’t care for the approaches mentioned, excellent as they are, primarily because I would rather put the processing burden on the instance when the trackback occurs, rather than each time the individual page is accessed (by accessing MySql or forcing the page to be PHP or using SSI). I’m putting the burden on the ‘write’ because trackbacks follow the ‘write once, read many times’ pattern.

Still, don’t you like it when you’re given ten different ways to do something?

Update:

Oopsie! I didn’t read the MT thread that closely to see that Phil had already created this work around. Teach me not to read the entire thread more closely! And I missed this change originally at Phil’s. Honest!

So, dibs on this bit of creativity goes to Phil! Darn! And here I thought I did something new.

Print Friendly, PDF & Email