Damien Krotkine home

Disqus is great. It's a full featured cross-site comments free management system. I have an account on it, so I wanted to use disqus instead of the typepad comments system.

"Easy enough" I said to myself : there is a dedicated page to help you install Disqus in Typepad. This includes adding a new "Embed your own HTML" module in your blog content, and copy-pasting a Javacript snippet in it.

Alas, the Javascript snippet didn't work fine. I suspect that the Typepad code has changed since the Disqus install documentation has been written.  Maybe the Javascript code of Typepad tries to block other scripts playing with the comment tags.

Anyway, here is a solution : I changed the code a bit, and wrapped it in an Javascript onload . I'm not saying it's the best solution, but it works for me... Here is the Javascript code snippet to be used instead of the one Disqus provides in the Typepad Install section. Of course, replace YOUR_DISQUS_LOGIN with, well, your disqus login...

<script type="text/javascript"> var my_func = function() { var div = document.getElementById('all-comments'); var script = document.createElement('script'); script.type = 'text/javascript'; script.src = 'http://disqus.com/forums/YOUR_DISQUS_LOGIN/embed.js'; document.getElementsByTagName('body')[0].appendChild(script); div.innerHTML = '' ; div.id = 'disqus_thread'; }; var x = window.onload; window.onload = function() {my_func(); if (x) x(); } </script> Let me know if it works for your Typepad blog.
blog comments powered by Disqus
Fork me on GitHub