Index: disqus.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/disqus/Attic/disqus.module,v
retrieving revision 1.1.2.23
diff -u -r1.1.2.23 disqus.module
--- disqus.module	30 Oct 2009 17:40:34 -0000	1.1.2.23
+++ disqus.module	10 Mar 2010 14:14:52 -0000
@@ -419,6 +419,13 @@
 }
 
 /**
+* Implementation of hook_view_api().
+*/
+function disqus_views_api() {
+  return array('api' => 2);
+}
+
+/**
  * Creates an instance of the Disqus PHP API.
  *
  * @param $user_api_key
Index: disqus.views.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/disqus/Attic/disqus.views.inc,v
retrieving revision 1.1.2.4
diff -u -r1.1.2.4 disqus.views.inc
--- disqus.views.inc	27 Aug 2009 23:40:14 -0000	1.1.2.4
+++ disqus.views.inc	10 Mar 2010 14:14:52 -0000
@@ -2,9 +2,9 @@
 // $Id: disqus.views.inc,v 1.1.2.4 2009/08/27 23:40:14 robloach Exp $
 
 /**
- * Implementation of hook_views_data().
- */
-function disqus_views_data() {
+* Implementation of hook_views_data_alter.
+*/
+function disqus_views_data_alter(&$data) {
   // Number of Disqus comments made on the given node.
   $data['node']['disqus_comments'] = array(
     'field' => array(
@@ -13,26 +13,21 @@
       'handler' => 'views_handler_field_node_disqus_comments',
     ),
   );
-  return $data;
 }
 
 /**
- * Field handler to present the number of Disqus comments on a node.
- */
-class views_handler_field_node_disqus_comments extends views_handler_field_node_link {
-  function construct() {
-    parent::construct();
-    $this->additional_fields['type'] = 'type';
-  }
-
-  /**
-   * When rendering the field.
-   */
-  function render($values) {
-    // Ensure Disqus comments are available on the node user has access to edit this node.
-    $node = node_load($this->aliases['nid']);
-    if (user_access('view disqus comments') && isset($node->disqus)) {
-      return theme('disqus_comments_num', $node->disqus);
-    }
-  }
+* Implementation of hook_views_handlers().
+*/
+function disqus_views_handlers() {
+  return array(
+    'info' => array(
+      'path' => drupal_get_path('module', 'disqus') . '/include',
+    ),
+    'handlers' => array(
+      // field handlers
+      'views_handler_field_node_disqus_comments' => array(
+        'parent' => 'views_handler_field',
+      ),
+    ),
+  );
 }
Index: include/views_handler_field_node_disqus_comments.inc
===================================================================
RCS file: include/views_handler_field_node_disqus_comments.inc
diff -N include/views_handler_field_node_disqus_comments.inc
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ include/views_handler_field_node_disqus_comments.inc	1 Jan 1970 00:00:00 -0000
@@ -0,0 +1,24 @@
+<?php
+/**
+* Field handler to present the number of Disqus comments on a node.
+*/
+class views_handler_field_node_disqus_comments extends views_handler_field {
+  function init(&$view, $options) {
+    parent::init($view, $options);
+  }
+
+  function query() {
+    // Override parent::query() without altering query.
+  }
+
+  /**
+   * When rendering the field.
+   */
+  function render($values) {
+    // Ensure Disqus comments are available on the node user has access to edit this node.
+    $node = node_load($values->nid);
+    if (user_access('view disqus comments') && isset($node->disqus)) {
+      return theme('disqus_comments_num', $node->disqus['domain'], $node->disqus['url']);
+    }
+  }
+}
