15 Oct, 2002
Index page Trackback Autodiscovery
Posted by: kristine In: MT hacks
When Movable Type came out with version 2.2, it added a feature for showing the way information on blogs linked together called Trackback. This added a whole great new set of options to the blogging software. With the new version 2.5, Trackback is enhanced by an auto-discovery tool. Auto discovery allows you to link to a permalink from a post and it automatically detects the trackback URL and sends a ping. This made pinging a bit more intuative, and allowed for much easier multiple pings.
In configuring Picture Yourself, I wanted an easy way for using pings, without needing to attach the incoming pings to just a random picture that was on the main page, with the normal MTEntryTrackbackData code. It made sense to use a Category-based Trackback ping, so I made a category set to accept pings, and put that in a popup window. Still not easy enough for the user, because they'd have to copy the URL out of the popup window and paste it in the URLs to ping box.
So I posted on the MTForums and Phil came up with a great solution (and even went beyond that and made an MTCategoryTrackbackData tag)! His solution allowed anyone to post a link to PictureYourself in their post, and that automatically would discover the ping URL for that category. I enhanced this a bit to work well on traditional blogs.
* Turn on pings for at least one category on your blog.
* Turn on Trackback Auto-discovery in the Blog Config under preferences
On my Main Index Template, before the MTEntries container, I added this code:
dc:date="<$MTDate format="%Y-%m-%dT%H:%M:%S"$><$MTBlogTimezone$>" />
Replace CATEGORY with the category which you have set to as "Accept incoming TrackBack pings" on your category page. I added the information in the dc:title tag so that when there was already MTEntryTrackbackData on the page (from other posts that were ping-able), it would differentiate it in the dropdown box of a bookmarklet as something like "ping kadyellebee!!".
Now anytime someone with MT2.5 mentions Picture Yourself or kadyellebee in their posts, it should automatically send me a ping.
If you'd like to create a listing of your incoming pings, you can use these tags somewhere on your site, or in a new index template that you could popup in the same way the comments box pops up:
<MTPings category="CATEGORY" sort_order="descend">
<a href="<$MTPingURL$>"><$MTPingBlogName$>: <$MTPingTitle$></a><br>
<$MTPingDate format="%m%d.%I:%M"$> – <$MTPingExcerpt$><br><br>
If you have more questions or ideas to go along with this, I look forward to reading them!