Using Trackback URLs with Your Blog


Have you seen trackback URLs on some blog sites, such as the one shown in Figure 13.23?

Figure 13.23. Trackback URL on a blog site.


Trackback URLs are special URLs that let bloggers know when other bloggers are talking about their posts. Trackback URLs send a "ping" from one blog to another (between web servers).

For example, if blogger A writes something interesting, and blogger B wants to comment on it, blogger B can post on his site. When the post appears on blogger B's site, a trackback ping enables blogger B's post to appear in the comments section on blogger A's site!

Suppose that your friend buys a new bike and gushes about the bike on his blog. If you are happy he finally got off the couch and bought the bike, you'd probably like to comment on his bike purchase. Rather than post a simple comment on his site, why not post a comment on your site and then inform his site you created a new post mentioning his new bike? You now have fresh, new commentary on your blog, and you have a comment on his blog at the same time (see Figure 13.24). This is what makes trackbacks so special.

Figure 13.24. Trackbacks are a blog-specific way to post between two parties or groups of bloggers.


The beauty of trackback comments is this: A blogger can manage her comments and still have them appear on the original blogger's post. In other words, a reader can comment on a post and still be able to edit or delete the post later. This isn't possible if you simply comment on the blogger's site. Once you click Submit that's it: You lose control of the comment. But if you comment using trackbacks, you can control the comment and also have it appear in two places: on your site and on the original site.

Trackbacks for Non-Trackback Blog Hosts

The site that started it all, Blogger.com, does not provide trackbacks for its bloggersnor do many other blog hosts. A small company called Haloscan has created a service that enables you to use trackbacks with these blog hosts, however.

Haloscan essentially takes over the commenting capabilities of your blog. When someone clicks the Comment link, the window that opens comes from the Haloscan site. If the poster wants to use Haloscan's trackback capabilities with your site rather than merely comment, he or she will copy the trackback URL, visit Haloscan's site, and then post from there.

Adding Haloscan's Trackback Service

To add trackback capabilities you simply need to register with Haloscan, http://www.haloscan.com, and then add some JavaScript code to your blog template. If you tweaked your template's colors earlier in this chapter, you should be familiar with the blog templateand, fortunately, should not fear changing your blog template.

If you use Blogger.com or another blog host that doesn't provide trackbacks, you really should consider adding the Haloscan service to your blog. That way your readers can use the trackback capabilities with your blog and theirs.

To set trackbacks in motion on your site, follow these steps:

1.

Visit the Haloscan site and sign up.

2.

Walk through the automated service if you're using Blogger.com. On the Code Generator page, select your blog host. If you're using Blogger.com, click the Automatic Install link.

3.

Some other blog hosts that do not provide trackbacks are also compatible with Haloscan, including WordPress, PHP-Nuke, BlogStudio, Trellix, iBlog, and Graymatter. The automated site is available only for Blogger.com blogs, however. If you're using a service other than Blogger.com, you will need to manually insert the JavaScript code. The Haloscan code appears in two places in a blog template, as described in Table 13.1.

Table 13.1. Haloscan Code Location

Location

Code

Immediately before the </head> tag (at the end of the <head> section):

<script type="text/javascript" src="/books/1/565/1/html/2/http://www.haloscan.com/load/ clicclic/"></script> </head>


Immediately after the Comments section in the main body of the page (look for a tag that includes something like <blogcomment..> or <blogitemcomment>

<BlogItemCommentsEnabled> <a  href="http://www.haloscan.com/comments/ clicclic/<$BlogItemNumber$>/" title= "Comment" onclick="HaloScan('<$Blog ItemNumber$>'); return false;"> ...



4.

If you are unable to use the automated code generator, paste the two snippets of code into your blog and then republish your page. Afterward, you should see a trackback link listed below each blog post (see Figure 13.26).

Figure 13.26. Trackback links appear under each post after you add Haloscan code to your blog.


Backing Up Your Template's New Code

It's important to know exactly where these comments appear in your template in case you later move to a new template. If you choose a new template for your Blogger.com blog, you will lose the Haloscan code and any other customizations you added or made. You can always walk through the Haloscan automated setup later, but why not keep a copy of your blog template with the Haloscan code in it as a backup? Follow these steps to back up your blog template with any new JavaScript code and changes you've made:

1.

Sign up with Haloscan and walk through the automated setup.

2.

Log in to Blogger.com and access the Dashboard. Click the Change Settings button next to your blog.

3.

Click the Template tab.

4.

Highlight the template code by pressing Ctrl+A (+A on the Mac) and then Ctrl+C (+C on the Mac). This copies the entire template.

5.

Open a text editor on your computer and paste in this code. Save it with a name like blogger_template_haloscan.txt.

Now you won't need to worry if you ever change templates. You will be able to reinsert the Haloscan code in the correct places in any new template. You will also need to reinsert your blog roll and links or RSS feed information should you ever change templates.

Using Haloscan Trackbacks

Now that you have trackback capabilities on your site, here's how you can use them:

  1. If you see a blog post that you want to comment on, and it provides trackback capabilities through Haloscan, click the Trackback link on the post; then copy the trackback URL (see Figure 13.27).

    Figure 13.27. Copy the trackback URL; then log in to haloscan.com to comment and ping.

  2. Visit the haloscan.com site and log in. Click Manage Trackback on the left; then click Send a Trackback Ping on the Manage Trackback Pings page.

  3. Comment as you would on any blog page and then paste the trackback URL into the Trackbacks to Ping section (see Figure 13.28).

    Figure 13.28. Paste the trackback URL on the Haloscan comment page.

  4. Click the Ping button. A success notification appears above your comments on the Haloscan page. If you visit your page you will see the trackback in the Trackback section (refer to Figure 13.25).

    Figure 13.25. Comments made through Haloscan appear on a blog but can be edited and deleted.



Blogosphere(c) Best of Blogs
Blogosphere: Best of Blogs
ISBN: 0789735261
EAN: 2147483647
Year: 2006
Pages: 138

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net