DISQUS 2 Is Awesome

I have to admit, for a while I really disliked DISQUS.

I’m a huge fan of WordPress, and do a signifiant amount of my development within it. I’d work on a new site, and then install the DISQUS plugin, and to my avail, commenting on my sites instantly sucked. Within the comment box, images rarely loaded correctly, and the layout was very much sucktastic.

While doing a super-casual mini-mashup for @LouisFabrizi, I discovered a lovely piece of code that lets you embed DISQUS commenting on any page period:

1
2
3
4
5
6
7
8
<div id="disqus_thread"></div><
   script type="text/javascript"
src="http://disqus.com/forums/kennethreitz/embed.js"></script><
   noscript><
a href="http://kennethreitz.disqus.com/?url=ref">
   View the discussion thread.</a></noscript><
a href="http://disqus.com" class="dsq-brlink">
   blog comments powered by <span class="logo-disqus">Disqus</span></a>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
<script type="text/javascript">
//<![CDATA[ (function() { 
   var links = document.getElementsByTagName('a');
   var query = '?';
   for(var i = 0; i < links.length; i++) {
      if(links[i].href.indexOf('#disqus_thread') >= 0) {
        query += 'url' + i + '=' +
        encodeURIComponent(links[i].href) + '&';
      }
   }
   document.write('<script charset="utf-8" type="text/javascript"
   src="http://disqus.com/forums/kennethreitz/get_num_replies.js'
   + query + '"></' + 'script>'); })();
//]]> </script>

And violâ, all of my problems were instantly solved. No more styling, layout, or loading issues. I even have the official plugin installed and dropped wp_comments() from my site template, and now all comments made via DISQUS are still stored in my local database.

Life has never been sweeter.

A big thanks to the DISQUS team. You took what IntenseDebate started, and ran with it. You’re making the net more sociable by the day – one blog at a time.  

2 FEEDBACKS

  1. Disqus now brings us the ability to comment using your Twitter account. You don’t have to give up your actual Twitter credentials since Disqus takes advantage of Twitter’s support..

LEAVE A COMMENT

Additional comments powered by BackType