Contributed by: Dirk Tuesday, November 22 2005 @ 02:05 pm EST
Trackback and Pingback both provide a convenient solution for the same problem: Making connections between posts on different sites. And since they are standardized, they can be sent to sites running other weblog / CMS software.
So let's say you've read about the release of Geeklog 1.4.0b1[*1] , proceeded to download it, tried it out, and then posted a review on your own site. How can you let people visiting geeklog.net know about your review? Sure, you could post a comment under the announcement, adding a link back to your site. But with Trackback and Pingback, you can do the same in a semi-automatic way without having to visit geeklog.net.
In other words: A Trackback comment is an automatically created comment, added to a post on some other site and pointing back to a post on your own site.
Technical details aside, the differences between Trackback and Pingback boil down to this: A Trackback contains, in addition to the link back to your post, the title of the post, the name of your site, and an excerpt of your post while Pingbacks contain only the link. Since they are much simpler Pingbacks can be sent mostly automatic while a Trackback comment requires some interaction, especially for the excerpt.
Once you've published your new article, Geeklog takes you to the Admin's list of stories in the system. There, in the last column, is a "Ping" icon that takes you to a form from where you can send Trackbacks and Pingbacks for your article (and Ping weblog directories, but that will be covered in another article).
The first option, Send Pingbacks, does just that: It picks all the links from your article and attempts to send a Pingback to all of them. The Pingback protocol provides a way to detect if a site is accepting Pingbacks, so Geeklog will only really send Pingbacks to sites accepting them.
There's nothing else for you to do here. When it's done, Geeklog will give you a list of all the links it sent a Pingback to, and whether it succeeded or not.
Skipping the option to Ping weblog directories, the last option on the form is Send Trackback. Clicking that button will take you to an editor where you can prepare the contents of the Trackback comment. If the article contains more than one link, you will have to select the URL to which you want to send the Trackback first. Geeklog will then also try to detect if the linked site is accepting Trackbacks. If Geeklog can not detect the Trackback URL automatically, you may still be able to copy and paste it manually from the linked site (assuming that it does indeed accept Trackbacks).
When preparing the excerpt to send with the comment, please keep a few things in mind. First of all, the receiving site will most likely shorten your text, typically to something like 255 characters (the limit used by MovableType and Geeklog, for example). Your excerpt will also be plain-text only - all HTML will be stripped.
Most of all, you should consider that the excerpt is read by a visitor of that other site who usually doesn't know anything at all about your site. Your excerpt should therefore make it clear why you send that Trackback. So it's important to select a portion of your post that refers to the post you're linking to.
Note: Actually, the only mandatory information to send in a Trackback is the link back to your article. So if you don't feel like summarizing your article, you could simple leave the excerpt empty. But then you could have sent a Pingback in the first place ...
You can now preview your Trackback (but keep in mind that it may actually look different on the receiving site, especially if it isn't running on Geeklog) and send it. Again, you will get a status message telling you if the Trackback was sent successfully or not.
On the receiving end, Geeklog doesn't make a difference between Pingbacks and Trackbacks once it has received them. A Pingback is treated as a Trackback without the excerpt and there's usually no way (and no need) to tell them apart once they've been stored in the database.
Trackbacks and Pingbacks are displayed in a special section below the article. In the Professional theme, that area is between the article's text and the comments, but it could also be below the comments, if you change the article template file, article/article.thtml, accordingly.
It has to be said: Trackback is a huge spam magnet. For the spammers, this is a dream come true - a standardized way to send spam to any website that accepts Trackbacks. Consequentially, Geeklog runs any Trackbacks and Pingbacks it receives through Spam-X, the spam filter plugin. And Geeklog 1.4 ships with a Spam-X module for mass deletion of Trackbacks, just in case.
Interestingly enough, in the 6+ months that I've been running two Trackback-enabled Geeklog sites, I have yet to see a Pingback spam. I guess it's just less attractive, since you can really only send the link and none of those spammy keywords.
There are several configuration options related to Trackback and Pingback in your config.php.
First of all, you can disable Trackback and Pingback independent of each other by setting one or both of the following to
// Disable trackback comments by setting this to 'false' $_CONF['trackback_enabled'] = true; // Disable pingbacks by setting this to 'false' $_CONF['pingback_enabled'] = true;
You can also disable both Trackback and Pingback (at the same time) for individual stories (just like disabling comments for a story) with a new option in the Admin's story editor. Here on geeklog.net, we did that for all stories prior to the 1.4.0b1 release announcement.
As with comments, you can also define the default setting for that Admin option, i.e. whether Trackbacks should be allowed by default when you create a new article:
// Allow / disallow trackbacks and pingbacks to stories by default // (can be changed individually for every story) $_CONF['trackback_code'] = 0; // 0 = trackbacks enabled, -1 = disabled
The options for Trackbacks in the What's New block are equivalent to the existing options for comments, i.e. you can define the interval for new Trackbacks and you can hide the Trackbacks section from the block:
// Following times are in seconds $_CONF['newtrackbackinterval'] = 172800; // = 48 hours // Set to 1 to hide a section from the What's New block: $_CONF['hidenewtrackbacks'] = 0;
You can choose to be notified when a new Trackback or Pingback arrives at your site by adding
'pingback' to the notification option:
// Send an email notification when a new submission has been made. The contents // of the array can be any combination of 'story', 'comment', 'trackback', // 'pingback', 'event', and 'user'. // Example: $_CONF['notification'] = array ('story', 'event'); // The email will be sent to $_CONF['site_mail'] $_CONF['notification'] = array ();
Another option defines how to handle multiple Trackbacks and Pingbacks coming from the same source and for the same URL (i.e. article) on your site:
// how to handle multiple trackbacks and pingbacks from the same URL: // 0 = reject, 1 = only keep the latest, 2 = allow multiple posts $_CONF['multiple_trackbacks'] = 0;
I can't really think of a good reason why you should allow multiple Trackbacks, other than maybe to allow the poster to correct mistakes (in which case you would want to set this option to
And finally, a special option for Pingbacks:
// how to handle pingbacks from one article on our site to another: // 0 = skip, 1 = allow, with speed limit, 2 = allow, without speed limit $_CONF['pingback_self'] = 0;
Trackbacks and Pingbacks are subject to a speed limit (using
$_CONF['commentspeedlimit'], i.e. the same speed limit as for comments). However, when you use Pingbacks on your own site to add backlinks to your own articles (e.g. to automatically add links to updates), you may find yourself in a situation where your new article links to more than one of your older articles. Due to the speed limit, only the first Pingback for those articles would make it through then. With the above option set to
2, you would allow Pingbacks without a speed limit, but only those coming from your own site. The default setting for this option is
0, which simply skips all attempts to send Pingbacks to your own site.