Comments Imported

You might have noticed that the “Most Comments” on the sidebar have changed drastically since yesterday. That is because I was finally able to import all my Haloscan comments.

Gabriel Misura has written the Perl code required to import comments from Haloscan. It works like a charm except that the email addresses get a bit funky in the process.

Here is the link for the plug-in and here are some instructions I wrote for it.

After importing the comments, I needed to fix the email addresses of the imported comments since I use the CommentLeaders plugin for counting the number of comments my readers have made. For that purpose, I used phpMyAdmin and Kristine’s wonderful tips for mySQL.

Thank you very much, Gabe.

Published
Categorized as Internet

By Zack

Dad, gadget guy, bookworm, political animal, global nomad, cyclist, hiker, tennis player, photographer

14 comments

  1. Cool! I decided awhile ago to try and import my old YACCS comments, but it turns out that nearly all of them had been deleted. I’m not sure why, but they had been sitting there for almost a year unused.

  2. Import Comments Success

    Well, I’m happy to report that at least one user has been able to use the Import Comments feature I added to Movable Type (no thanks to my sorry excuse for documentation/instructions and blindness to emails). Zack was able to…

  3. Imported Comments!

    Gabe Misura has written a script for importing Haloscan comments into Moveable Type. You can get it from MT Plugins or directly from Gabe. Zack Ajmal has written a blurb about his experience and an installation tutorial. Most importantly, don’t…

  4. Whoa! On second thought, after looking over the spec I think I’ll just leave those Haloscan comments right where they are thank you. But major geek props to you for getting it to work!

  5. Bin Gregory: If you need any help with transferring your comments, let me know. I’ll be glad to do it for you.

  6. Zack, I’m guessing this doesn’t work for MT 3.14? I tried the steps and the Import Comments button never shows up. Thanks for your help if you can. If not, not a big deal…my blog is pretty new and I don’t have a lot of comments yet.

  7. Hi,

    I just got it working for MT 3.16. It was all based on Gabriel Misura’s code and your helpful comments. However, I only imported the text of the comment, author, and date of comment. There are no hyperlinks. I wanted it that way since I don’t like linking to people’s email addresses and I didn’t care for the links to people’s websites. The perl code wasn’t outputing it to the Database anyways. It did the job for me though. The files I modified were:

    \lib\MT\App\CMS.pm
    \tmpl\cms\header.tmpl
    \tmpl\cms\import_comments.tmpl
    \images\nav-import-comments.gif
    \styles.css (you have to add the image to the “Import Comments” location here)
    \extlib\HTML\TableExtract.pm

    What is no longer used in MT3.xx is:

    \tmpl\cms\mininav.tmpl (this is now been deprecated by header.tmpl)

    Btw, I don’t know Perl, and I just started hacking at MT about 2 days ago.

    As well, the import brought in some garbage HTML:

    There were 2 types:

    1. The actual HTML source of the Haloscan comments window
    2. The copyright/powered by Haloscan stuff

    I had to go into the MySQL database and run the following 2 commands:

    DELETE FROM `mt`.`mt_comment` where comment_text like ‘%form method%’
    DELETE FROM `mt`.`mt_comment` WHERE comment_text like ‘<p align=”center”>%’

    After removing the rubbish, I was simply too lazy to publish the comments to I just did the following:

    UPDATE `mt`.`mt_comment` SET comment_visible=’1’

    Yes. This is defintely not for the average user 🙁 But it worked for me.

Comments are closed.