Import comments from disqus

To be honest I’ve never really bothered with Disqus. Why use it, when you can use CompojoomComment, right? Few days ago, a customer asked on the forum how to import comments from disqus. Well, the short answer was of course – you can’t. The longer one was – well, let me see what I can do. After a short look at their documentation I decided to sit down, register for the service, create few test comments, export them and import them into CompojoomComment. It was not all that difficult, but I had to reverse engineer few things to be able to properly import the comments.

About disqus – pretty cool system! I was astonished how easy it is to be used (big role here plays the joomlaworks plugin for joomla…). However, I’m sure you know that already – if you want a deeper integration with joomla – disqus is not your thing…

Anyway, back to the script. You can download it from here. Unzip it and upload it via ftp to your site in a subfolder. (the name of the subfolder is irrelevant, but let us use disqus :)). So, once you’ve placed the disqus.php file in the folder, upload your exported disqus comment file to that folder as well. Rename the export file to disqus.xml . Once everything is in place open your site in a browser and navigate to the disqus.php file. Like this http://PLACE_THE_URL_OF_YOUR_SITE_HERE/disqus/disqus.php for example.
Your comments should be now imported in the database.

Note: the script won’t display any success or error messages. If you want to know if the comments are imported properly – just go to the comment manager – if you see them there, then everything is fine. If they are not imported, then something is going wrong on your server. Enable the display of error messages and let us know. I’m planning to add this script to the next version of CompojoomComment and that is why I’m not putting any efforts in making this script more user friendly… It will be user friendly once it is in the package – now it is for geeks :) Note2: Delete everything after you are done! If you execute the script in your browser again, then guess what – it will try to import the comments a second time…
Rate this blog entry:
1
Every problem has the right solution
Free ticket to Joomla Day Spain 2011