Wednesday, November 9, 2005

HaloScan TrackBacks, but not Comments? Part II

Tuesday, we discusses installing HaloScan TrackBacks without installing HaloScan comments on a Blogger system.

And, while it works going forward, what about previous comments?

Or, more specifically, here's the question that was put to me:
Now how do we migrate our Haloscan comments back to the blogger ones?
Do you want the good news or the bad news first?

The bad news? Okay, you can't import HaloScan comments into your Blogger system.

The good news? There is a workaround to keep your old HaloScan comments.

In fact, there are a couple of ways to handle it. Keep reading ...

What's The Easiest Way?

It's difficult to say what's the easiest way to accomplish this. It actually depends on personal preference, since one way is not really easier than another way.

We Have To Make Choices Don't We?

Let's lay out the possibilities, then cover the way we want to do it.

Remember, we're talking about a system that has been using HaloScan comments, but wants to change to Blogger comments. If you're adding comments for the very first time, we covered everything Tuesday.

So, What Are Our Choices?

Here's what we need to decide:

  • Do we want to allow both Blogger and HaloScan comments on the all post, historical and going forward?
  • Or do we allow HaloScan posts only on previous posts and and Blogger comments going forward?
  • How much work do we want to do?

I think I know the answer to that last question.

So, What Did We Decide?

Here's what I'm going to suggest: For the old posts, leave HaloScan comments in place and don't add Blogger comments to them. For new posts, use Blogger comments but not HaloScan comments.

Here's why: By default, when you enable Blogger comments for the very first time, it only affects posts from that point forward. That is, it doesn't go back and add them to the old posts.

And because Blogger allows you to turn comments on and off at the post level (that is, one post can have comments off and another can have comments on), we can use that fact to our advantage.

I Bet There Are Blogger Tags Involved

You see, Blogger has a tag that handles that. The tag is <BlogItemCommentsEnabled> and will come in handy for this.

So, What's All That Mean?

Here's how it's going to work when we're done.

All posts will use either HaloScan comments or Blogger comments, but not both.

Old posts that had HaloScan comments will still use HaloScan and only HaloScan.

New posts will use the Blogger comments. HaloScan won't show on those.

Turn On Blogger Comments

First, let's turn Blogger commenting on.

From your Blogger interface, go to your Settings tab.

From there, select "Comments."

Make sure comments are set to "Show."


You need to back up your template. Never, never, never make any changes to your Blogger template without making a backup. Trust me on this. Don't learn the hard way!

Turn HaloScan Comments Off

To hide HaloScan comments on new posts, find The HaloScan code in your Template. It probably looks a lot like this:
<a href="javascript:HaloScan('<$BlogItemNumber$>');" target="_self"> <script type="text/javascript"> postCount('<$BlogItemNumber$>'); </script></a>
Please make sure you are using the piece that has "postCount" and not "postCountTB" since you probably have both!

Right before the HaloScan comment code, put this:
<BlogItemCommentsEnabled> <!-- </BlogItemCommentsEnabled>
Right after the HaloScan comment code, put this:
<BlogItemCommentsEnabled> --> </BlogItemCommentsEnabled>
Now, HaloScan comments will not display if Blogger comments are enabled on the post, which means the new post from now on.

Now What?

Depending on your settings, you might be done! Let's check it out.

Create a new post called "Test Post" that says, well, "Test post." Or "Testing Blogger comments." Or something. It really doesn't matter.

Make sure "Allow New Comments and Backlinks on This Post" is set to "Yes."

Publish it and look at your blog.

You should see the Blogger comment link and not the HaloScan comment link.

But you might not.

If you see the HaloScan comment link, then turning on Blogger comments didn't work right and we need to restore your template and starting over.

But if you do not see HaloScan comment link, we're half-way there.

If you see your Blogger comment link, we're done.

If you do not see your Blogger comment link, we have to insert code for that.

Add Blogger Comment Code

Just because we turned on Blogger comments, they won't show if code isn't in the Template to show the code. Again, if you see Blogger comments, you can skip this part.

Go find the code we inserted to disable HaloScan comments.

Just before that, put this:
   <a href="<$BlogItemCommentCreate$>"
   <$BlogItemCommentCount$> comments</a>
No, that third line isn't a type. We actually have ">>" at the end of that line.

Now, look for this in your Template:
Got it? Good. Now look for this:
<div id="comments">
Got it? Good. Now, immediately after that, insert this:
   <a name="comments"></a>
   <h4><$BlogItemCommentCount$> Comments:</h4>
      <a name="<$BlogCommentNumber$>"></a>
      <p class="comment-body">
      <p class="comment-data">
         By <$BlogCommentAuthor$>, at
         <a href="#<$BlogCommentNumber$>">
   <p><a href="<$BlogItemCommentCreate$>"
   Post a Comment</a></p>
Anyway, save it and publish your blog.

Write a new test post, remember to ensure that "Allow New Comments and Backlinks on This Post" is set to "Yes."

View your blog and click the link to add a comment.

Add a comments. You can say "testing" or whatever you like. Just add a comment.

Then view your blog. You should see the comment link. And, when you click on the post Permalink, you'll see the test comment you just entered.

That's It?

We now have HaloScan comments on old posts, and Blogger comments on new posts. And that's what we were trying to do. So we're done.

Speaking of Blogger...

As long as we're talking about Blogger, I have some questions for you.

  • What do you dislike about Blogger?
  • If you used to have a Blogger blog and moved, why?
  • If you looked at several options and rejected Blogger, why?
  • If you are currently on Blogger and want to move, why?

Tell me what you don't like about Blogger. I've been asked about
alternatives to Blogger, but the answer depends on what about Blogger
is disliked. I know what I don't like about it, but I'm very curious
what you don't like about it.

Drop me a line at and vent about Blogger. And we'll come up with some good alternatives that address those problems.

1 comment:

  1. The day after ...

    Today's dose of NIF - News, Interesting & Funny ... It's the Free Jack Idema Blogburst! (+ Open Trackbacks)


Please choose a Profile in "Comment as" or sign your name to Anonymous comments. Comment policy