The Movable Type User Manual

NOTE: This documentation is for Movable Type 3.2. If you are using a newer version, please see the documentation for Movable type 3.3x or Movable Type Enterprise.

« 7: Comments | Up | 9: Email »

Chapter 8: TrackBack

In this section:


We should probably included a full explanation of TrackBack and how it works, but there isn't enough time to do it justice.

Needs refinement. This comes in out of nowhere. better define "resource" and "communication."

Weblog comments still require the use of that particular site's interface and the content is limited to that one weblog unless it is cut, pasted, and posted elsewhere.

Released in August 2002 as both an open protocol and new functionality in MT version 2.2, TrackBack was designed to provide a means of notification through a small message called a ping that establishes a link between web resources.

This sounds simple, but its potential applications are actually quite broad. To compound matters, many confuse link tracking, as it is implemented in MT and other tools, as the protocol's sole purpose, thereby missing other realms of possibility.

TrackBack Pings Listing Screen

This screen displays a list of all TrackBack pings for either a weblog or for the system. You can reach this screen by clicking the TrackBacks button on the Weblog Toolbar or System Toolbar.

Problem

You want to set up and configure TrackBack functionality for your system

Solution

Use the TrackBack configuration directives in mt-config.cgi

Discussion

Configuration of the TrackBack functionality is done in both the mt-config.cgi file and the Weblog settings. The following are the configuration directives that are related to TrackBacks and pings.

  • TrackBackScript

    Sets the name of the TrackBack script in the MT home directory. The default is mt-tb.cgi.

  • GenerateTrackBackRSS

    Individual RSS 0.91 feeds will be automatically created and managed, listing the pings for each TrackBack item in your Movable Type system. Using this directive with a value of 0 (false) suppresses this functionality.

The TrackBack functions in MT rely on the widely used LWP package, Perl's libraries for fetching and processing web resources. The package's user agent is used to send pings in conjunction with the following directives. Other LWP-powered scripts may utilize these settings also.

  • PingTimeout

    The time in seconds that the agent will wait before aborting the operation. This avoids any lengthy waits that may (seemingly) freeze the system. The default is 15 seconds.

    This value is passed to LWP::Agent::timeout method.

  • PingInterface

    Outgoing pings are sent to the Internet using the default network interface card (NIC) on the server running MT. In some cases, it may be necessary or desirable to have the outbound ping traffic sent over a different NIC or network connection. In these situations, enter the IP address of the NIC that should be used to send the outgoing notifications.

    Specify only the IP address (xxx.xxx.xxx.xxx), or IP address and port number (xxx.xxx.xxx.xxx:#). If no port number is specified the outgoing ping will be sent from the specified IP address using the next available port number.

    If you are using this directive, do not specify a port unless it's absolutely necessary. If the specified port is in use the outgoing ping will fail without error.

  • PingProxy

    In cases where the MT system is behind a firewall or on an internal, private network, a proxy server must be used to access the Internet for outbound pings. This directive takes the fully-qualified URL of the proxy server and routes all outbound pings through it. The default is null (blank) which indicates that you have direct access to the Internet.

    This value is used with the LWP::Agent::proxy method.

  • PingNoProxy

    When PingProxy is set, MT will route outbound pings through the specified proxy except for pings to the domains listed with this directive. Multiple domains are separated by commas. The default is "localhost, 127.0.0.1".

    This value is passed to LWP::Agent::no_proxy method.

These configuration values are used system wide. MT's implementation of TrackBack allows for a few settings to be enabled on a per-weblog basis.

Problem

You want to receive TrackBack pings for an entry.

Solution

Check the Accept TrackBacks checkbox on the New/Edit Entry screen.

Discussion

Setting up an entry to receive TrackBack pings is quite easy. Merely check Accept TrackBacks on the New/Edit Entry screen and save the entry. Assuming the entry has a status of "Publish," your entry can be pinged.

Depending on the display options you have set for the New/Edit Entry screen, this control may not be visible.

While TrackBack clients will now be able to ping the entry, they will not be able to discover the URL to ping without some hidden data in the entry's page. Make sure you've inserted the MTEntryTrackBackData tag into the template where the entry appears. The default templates that ship with MT do have this tag.

Problem

You want to ping a resource, such as a weblog post, from an entry.

Solution

Enter the TrackBack URL into the Outbound TrackBack URL's textbox on any New/Edit Entry Screen.

Discussion

Most users will ping resources using the Trackback Auto-discovery option, but there are times when this won't suffice. Some examples of this: highly relevant posts elsewhere that you didn't link to; an entry that was made after yours.

There should be a facility on the New/Edit Entry to auto-discover TrackBack information on a URL the author enters.

Take the TrackBack URL of the resource that you want to ping and enter it into the "Outbound TrackBack URLs" textbox. Depending on the display options you have set for the New/Edit Entry screen, this control may not be visible. If you have multiple resources to ping, enter each on their own line and save the entry. If the entry has a status of "Publish," the resources will be pinged. Otherwise the URLs will be saved until the entry's status does change.

Problem

You don't want to be bothered figuring out which links in your entry are TrackBack-enabled.

Solution

Use the TrackBack Auto-Discovery option on the New Entry Defaults tab of the Settings Screen.

Discussion

TrackBack clients need a method of determining the TrackBack Ping URL for a particular URL. If a resource is courteous, they will have embedded the information necessary to make a TrackBack ping. (This is the same information that the MTEntryTrackBackData will insert into a template.) This information allows the TrackBack client to auto-discover the TrackBack Ping URL and send the ping without further data entry or intervention from the user.

To enable TrackBack Auto-Discovery, click Settings on the Weblog Toolbar and go to the New Entry Defaults tab. Check the TrackBAck Auto-Discovery option under the Publicity/Remote Interfaces section.

Problem

You want to lay out TrackBack ping data.

Solution

Use the template tags that are prefixed with MTPing or MTEntryTrackBack.

Discussion

We've already mentioned MTEntryTrackBackData, which inserts the bits of data that a TrackBack client will need to ping the entry using auto-discovery. This tag must be used in the context of an entry to work properly.

It is not recommended that you use this tag in a template where multiple entries/resources exist. Having multiple instances of TrackBack data confuses matters and adds an additional manual step to the auto-discovery processes: selecting which resource to ping. Avoid it if you can.

This simple example should be used in an entry context:

 <MTEntryIfPingsAccepted>
   <h2 id="trackbacks">TrackBack Pings</h2>
   <MTPings>
     <p id="p<$MTPingID$>">
     <a href="<$MTPingURL$>"><$MTPingTitle$></a> from  <$MTPingBlogName$><br />
     <$MTPingExcerpt$> <a href="<$MTPingURL$>">[Read More]</a>
     </p>
     <p class="posted">Tracked on <$MTPingDate$></p>
   </MTPings>
 </MTEntryIfPingsAccepted>
 

MTPings creates the necessary context and (presumably) loops through a collection of pings to be inserted. When used in the context of an entry, pings are automatically filtered to only include those pertaining to that entry.

Next, use MTPingID to create an anchor, insert a hyperlinked title using MTPingURL and MTPingTitle, and insert the name of the weblog (MTPingBlogName) that is making the ping. We add the supplied excerpt with MTPingExcerpt and create another hyperlink that will take the user to the resource that made the ping. Finally, we insert the date of the ping and close out the ping's context. The entire block is wrapped in a EntryIfAllowPings tag which only outputs the ping data if the entry permits pings.

In addition to pings received, MT also allows us to create a list of pings that have been sent out, although the information is more limited.

 <MTPingsSent>
 URL: <$MTPingsSentURL$><br/>
 </MTPingsSent>
 

MTPingsSentURL inserts the URL that was pinged. MTPingSent creates the context around it and loops through the list.

Displaying outbound and inbound TrackBack pings for categories are generally the same as entries other then their context.

Problem

You want to know which TrackBack resources have been pinged with an entry.

Solution

Click the "View Previously Sent Pings" link on the Edit Entry screen.

Discussion

Movable Type records all outbound TrackBack pings for each entry. To see this list, click "View Previously Sent Pings" on any Edit Entry screen. This will open a pop-up window with a list of resources that have already been pinged.

Depending on the display options you have set for the New/Edit Entry screen, this link may not be visible. It is tied to the "URLs to Ping" option.

Problem

You want to ping a URL each time an entry is posted to a given category.

Solution

Enter the URL in the outbound TrackBack URLs text box in the Edit Categories screen.

Discussion

As mentioned in the article entitled "Enabling a Category as a TrackBack repository", you can use TrackBack for more than just communication on particular entries. TrackBack pings can also be associated with categories in your weblog.

Likewise, users writing about Perl can set up MT to automatically notify specific TrackBack servers when a new post is made to an associated category. This allows remote sites to keep a repository of links across multiple Web sites. In a sense, this usage is "push" syndication.

To set up MT to ping a TrackBack repository when a post is made to a category, click Categories in the Weblog Toolbar. Click on the category name you want to enable and scroll down to the "Outbound TrackBack URLs to Ping" text box. Enter the URL(s), one to each line and finally press the Save Changes button at the bottom.

Problem

You want to accept pings related to a weblog category from other TrackBack-enabled publishing tools.

Solution

Use the "Accept incoming TrackBack pings" option on the Edit Category screen.

Discussion

You can use TrackBack for more than just communicating a link on particular entries. TrackBack pings can also be associated with weblog categories.

For example, if you run a site about Perl, you could provide a repository of links to Perl articles and posts on other weblogs. Using TrackBack, you can allow other weblogs to ping that category whenever a pertinent entry is posted.

To set up the category as a repository that can receive pings, look under the Incoming Pings section on the same screen and switch the radio button labeled "Accept Inbound TrackBacks?" to "On."

You can optionally restrict who is allowed to ping the repository by entering a passphrase into the supplied text box. When this is set, any pings to this category must have this pass phrase attached, or the ping will not be accepted. This feature is only meant to provide some simple access control, as the passphrase is transmitted using the URL string and is not considered secure.

Problem

You want to limit the HTML that will be displayed from inbound TrackBack pings.

Solution

Either modify the "Limit HTML Tags" settings of the weblog or accept the system defaults.

Discussion

TrackBack pings share the ability to limit HTML markup to a subset of tags. This subset is defined by the "Limit HTML Tags" controls found in the weblog's general settings screen.

Six Apart
Makers of weblog software and services for individuals, organizations and businesses.
This website is powered by Movable Type.