Configuring Trackbacks in Drupal
Leaving Tracks
Trackbacks offer a simple means for bloggers to connect and share information.
A trackback is a way for a blogger to automatically notify different blogs that he or she has either begun or extended a conversation with another blogger. A trackback is one of three main types of linkbacks (see the "Trackbacks and Linkbacks" box) that bloggers use to keep track of each other's postings and ensure that their readers can link to related content. Once a website has trackbacks enabled, one blogger can reach out to another on a separate site by sending a "ping" to that user. The ping simply says, "Here's a topic that is related to what you've posted, check it out."
If a blogger on a separate site wants to respond, the conversation between the two bloggers becomes stronger. To use the parlance of today's blogging community, the conversation between these two bloggers becomes "context" because now they have been participating in a detailed, relevant conversation. They are building a body of knowledge that will be useful to any reader interested in the topic they are writing about.
With trackbacks, two seemingly unrelated conversations become more strongly associated. Each time an update occurs in the conversation, the context becomes stronger and richer. Search engines often rank pages higher if they are linked from other sites. Trackbacks thus promote higher ratings and perhaps more exposure for a project or product.
Several content management systems (CMSs) include trackback options. In Drupal [1], if you've enabled trackbacks, a blogger on your system just has to enter the URL of a remote blogger who supports trackbacks, and the blogger will be notified. In this article, I describe how to set up trackbacks in Drupal with examples based on the implementation included with Ubuntu 8.04. If you use a different CMS, the configuration will differ but the steps are similar.
Trackbacks and Linkbacks
A trackback is a particular form of a linkback. Three methods of linkback exist:
- Pingback – A set of protocols that allows you to determine quickly when a remote site has linked to your content or web page. You can also use pingbacks to automatically generate reports.
- Trackback – Similar to a pingback, but more prone to spamming because connections can be initiated without first establishing a relationship.
- Refback – An increasingly rare term describing a tracking protocol that allows an author to determine the remote sites and authors who have generated links to them.
You can learn more about linkbacks in all their forms in various sources, although I recommend beginning at Wikipedia [2], then going to other sources [3] [4].
Getting Started
To enable trackbacks in Drupal, you'll need the TrackBacks module, which is available at the Drupal website [5]. Because so many implementations of Drupal exist, the creators have worked hard to support both 5.x and 6.x versions. As with most modules in Drupal, installation of the module is simple. Simply untar and uncompress the archive inside of the /var/www/drupal/modules/ directory. Again, if you are using a different Linux version, substitute the correct path for your particular distribution.
Once you've unpacked the module, your /var/www/drupal/modules/ directory should have the structure shown in Figure 1. You shouldn't have to restart Apache after installing the module. If you are upgrading from a previous module version, however, you'll have to go Administer | Modules then run the update.php script.
Once you've installed the module, you'll need to enable it. To do this, go to Administer | Modules, then scroll down through the list of installed modules. Enable the trackback module by selecting the checkbox next to it (Figure 2), then click on the Save configuration button. If you plan on using trackbacks along with blogging, you'll also want to enable the blogging module.
Configuring Trackbacks
The official trackback documentation is rather sparse on the configuration topic [6]. Most of the configuration options are available in the Drupal Administer section. Go to Administer | Settings | Trackback, and you'll find the menu options shown in Figure 3.
This menu allows you to determine exactly how Drupal will handle trackbacks. Settings include:
- Auto-detection
- Moderation
- Rejecting one-way trackbacks
- Trackback location
If you enable auto-detection in this particular Drupal module, any URL you post will be checked automatically for a trackback link. It doesn't matter whether you enter the link in a URL or plain text form. The trackback module will check each URL in your document, and it will check to see whether the URL on each page goes to a site that allows and accepts trackbacks. If the remote site does allow trackbacks, the Drupal trackback module will send a ping to the trackback URL found on the remote page.
Auto-detection of every URL can bog down your server, especially if you have quite a few URLs on your page. If you're worried about the volume, use the Run auto-detection on cron option, which delays the URL check until the next time cron is run. If you set cron to run at a time when the server is not busy, it is possible that no one will notice the performance slowdown. The problem with this option is that you won't have trackbacks enabled instantly. It's up to you to configure your cron settings optimally.
Also remember that auto-detection can open your server to spam trackbacks, a trackback that attempts to link your content to unrelated postings. This form of spam is as annoying as traditional email spam.
If you choose to moderate your trackbacks, you will have to manually consider each and every submission. If you're already busy as an administrator, selecting the Moderation setting will make your life even busier. However, it does let you review the suitability of trackbacks and reduce the amount of trackback spam. To review trackbacks, select the Administer | Trackbacks menu option.
Search engines and many bloggers want to see only trackbacks that have been mutually initiated. If you opt to reject one-way trackbacks, then you require mutual trackbacks. Although you might increase the quality of you trackbacks, other bloggers might have a problem initiating contexts and pings.
Trackback location determines where trackback replies will appear in a blogger's post. The default setting positions the trackback URL immediately beneath the post, but you can have these entries posted on a separate page or inline with the text. Most administrators keep the default setting because most people want to see how popular the posting is with other bloggers. If you want to hide trackback replies for whatever reason, select Display on a separate page.
Configuring Content Types
The final configuration task is to determine which content types you want to enable for trackbacks. Trackbacks are enabled by default for all blogs in Drupal, no matter what version you're using. However, they are the only content type enabled by default. The user must explicitly allow trackbacks for other content, such as pages, stories, or other types.
To allow trackbacks for these other content types, go to Administer | Settings | Content types and you will see the various choices. To enable trackbacks for all new pages, click on configure next to the content type, and choose Enabled under Trackbacks.
These trackback settings are not retroactive; if you enable trackbacks for new pages, you will still have to go back and re-publish existing pages to add trackbacks to your previous work. This step will enable trackbacks for any older page, and you'll have to do this for each page individually.
If you want to enable trackbacks for individual entries, you will have to explicitly enable them for each content type by clicking on each URL and enabling the trackback feature.
Buy this article as PDF
(incl. VAT)
Buy Linux Magazine
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters
Support Our Work
Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.
News
-
New Slimbook EVO with Raw AMD Ryzen Power
If you're looking for serious power in a 14" ultrabook that is powered by Linux, Slimbook has just the thing for you.
-
The Gnome Foundation Struggling to Stay Afloat
The foundation behind the Gnome desktop environment is having to go through some serious belt-tightening due to continued financial problems.
-
Thousands of Linux Servers Infected with Stealth Malware Since 2021
Perfctl is capable of remaining undetected, which makes it dangerous and hard to mitigate.
-
Halcyon Creates Anti-Ransomware Protection for Linux
As more Linux systems are targeted by ransomware, Halcyon is stepping up its protection.
-
Valve and Arch Linux Announce Collaboration
Valve and Arch have come together for two projects that will have a serious impact on the Linux distribution.
-
Hacker Successfully Runs Linux on a CPU from the Early ‘70s
From the office of "Look what I can do," Dmitry Grinberg was able to get Linux running on a processor that was created in 1971.
-
OSI and LPI Form Strategic Alliance
With a goal of strengthening Linux and open source communities, this new alliance aims to nurture the growth of more highly skilled professionals.
-
Fedora 41 Beta Available with Some Interesting Additions
If you're a Fedora fan, you'll be excited to hear the beta version of the latest release is now available for testing and includes plenty of updates.
-
AlmaLinux Unveils New Hardware Certification Process
The AlmaLinux Hardware Certification Program run by the Certification Special Interest Group (SIG) aims to ensure seamless compatibility between AlmaLinux and a wide range of hardware configurations.
-
Wind River Introduces eLxr Pro Linux Solution
eLxr Pro offers an end-to-end Linux solution backed by expert commercial support.