Importing Haloscan Comments to Movable Type

Gabriel Misura has modified the Movable Type code so that you can import Haloscan comments just like you import your blog entries in MT. The package is available here or here.

It based on the idea that all Haloscan comments are available at a URL like:

http://www.haloscan.com/comments.php?user=USER_ID&comment=BLOG_ENTRY_ID

My many thanks to him for doing this since I had almost abandoned trying to get my numerous old Haloscan comments into MT.

Here are the instructions for using this plug-in. Please note that I used this plugin with Movable Type version 2.64 while Gabe modified version 2.63. I am not sure if it works with later (> 2.64) versions.

  1. You should already have imported all the posts for which you want to import the comments.
  2. Make a backup of your MT weblogs by exporting all entries.
  3. Download the plug-in zip file from here.
  4. You might also need to download the HTML::TableExtract module. Extract the TableExtract.pm file and copy it to the directory CGIPath/extlib/HTML (where CGIPath is the path where all your Movable Type cgi files are stored).
  5. Since this plug-in modifies several MT files (like CMS.pm), it is probably a good idea to backup all those files as well.
  6. FTP to your webhost account and download the following files for backup purposes. Please note that CGIPath is the directory where all your Movable Type cgi files are stored and StaticWebPath is the one where all the Movable Type static content (images etc.) is stored. You can check these paths from CGIPath/mt.cfg file.
    • CGIPath/lib/MT/App/CMS.pm
    • CGIPath/tmpl/cms/import_comments.tmpl
    • CGIPath/tmpl/cms/mininav.tmpl
    • StaticWebPath/images/lang-en-us/nav-import-comments.gif
  7. Unzip the plug-in on your computer.
  8. You’ll see the same file names as the previous step. FTP these unzipped files over to your account in the same directories from where you downloaded the files in the previous step.
  9. Now, you need to export your old Blogger entries corresponding to the comments by following the directions here but with the following template (Only follow the export entries from Blogger part there):
    <Blogger>
    AUTHOR: <$BlogItemAuthor$>
    DATE: <$BlogItemDateTime$>
    ID: <$BlogItemNumber$>
    -----
    BODY:
    <$BlogItemBody$>
    --------
    </Blogger>
  10. FTP the HTML file containing the Blogger entries to the Movable Type import directory.
  11. When you run Movable Type from your browser, you will see an “Import Comments” button next to the “Import/Export” button.
  12. Click on the “Import Comments” button and enter your Haloscan user name.
  13. When the import process is complete, you will see a detailed report about it similar to the one you saw when importing entries.
  14. You comments should be imported now.
  15. If you want to restore the original Movable Type files that the plug-in overwrote, FTP the backup files you have saved back to the server.
  16. You are done.

Written by Zack Ajmal.