Friday, February 19, 2010

Blog Comments - Converting from Haloscan to Disqus

Just a technical update that might be of some interest to other bloggers.

Many of us have used Haloscan for our blog comments. A few months ago, Haloscan decided to end its free service. It would convert the comments to another system, Echo, but would charge an annual fee. Anyone who did not want to do this could export comments from Haloscan in XML format to his or her own hard drive. All the comments would be saved, but unfortunately, no other commenting service had an easy way (or even a difficult way, for that matter) to import these files.

I exported the Haloscan comments from this blog and then poked around the web. I switched over to a new commenting system, Disqus, that seems to be working pretty well. Disqus allows bloggers to import comments from other commenting systems, like IntenseDebate and JS-Kit, but unfortunately not from Haloscan. (Disqus says that are working on that.)

I realized that if I could convert the comments from the Disqus XML format to one of these other formats, I should be able to upload the comments. So I wrote a short Perl script to do that. I converted one big comment file into a second big comment file and tried to upload that. The comments failed to upload and generated a (unspecified) error. To isolate the problem I then modified the Perl script to create a bunch of smaller XML files (one for each post with all the comments to that post), and tried uploading each of those files. Some files uploaded, but others did not. This shows that the general approach works, but there are some particular problems. I e-mailed the technical people at Disqus to try to isolate the problem. If that doesn't work, I have a few other ideas about how to move these comments into Disqus.

The bottom line is that all the prior comments to this blog are saved. I have been able to move some of them to the new commenting system, and -- one way or another -- I will move the rest of them as well. Once I do so, I will explain how I did so.

If you are a blogger who used Haloscan, I would suggest exporting your Haloscan comments immediately. Don't worry if you don't understand any of the technical information. Just save that file on your hard drive, remember where you put it, and hang on to it. At some point, someone (Disqus, me, someone else) will figure out how to easily convert all the comments, and at that point, you can convert your old comments as well.

In the meantime, you need a commenting system. Feel free to add Disqus, go back to blogger's default comments, or use some other commenting system.