Index: sharethis.info
===================================================================
--- sharethis.info	(revision 853)
+++ sharethis.info	(working copy)
@@ -2,6 +2,7 @@
 name = ShareThis
 description = "Implements the ShareThis system created by Alex King into posts."
 core = 6.x
+package = Other
 
 ; Information added by drupal.org packaging script on 2008-12-17
 version = "6.x-1.4"
Index: sharethis_handler_link.inc
===================================================================
--- sharethis_handler_link.inc	(revision 0)
+++ sharethis_handler_link.inc	(revision 0)
@@ -0,0 +1,19 @@
+<?php
+// $Id$
+/**
+ * Field handler to present a link node edit.
+ */
+class sharethis_handler_link extends views_handler_field_node_link {
+  function construct() {
+    parent::construct();
+    $this->additional_fields['title'] = 'title';
+  }
+
+  function render($values) {
+    $node = new stdClass();
+    $node->nid = $values->{$this->aliases['nid']};
+    $node->title = 'dsd';
+
+    return theme('sharethis', $node);
+  }
+}
Index: sharethis.module
===================================================================
--- sharethis.module	(revision 853)
+++ sharethis.module	(working copy)
@@ -113,18 +113,15 @@
 /**
  * Implementation of hook_nodeapi().
  */
-function sharethis_nodeapi(& $node, $op, $teaser, $page) {
+function sharethis_nodeapi(&$node, $op, $teaser, $page) {
   switch ($op) {
     case 'view':
       if (!$teaser || variable_get('sharethis_teaser', 1)) {
         if (variable_get('sharethis_sharethis_this_where', 'links') == 'nodes') {
           if (_sharethis_sharethis_this_show($node->type, $node->nid) && user_access('use share this')) {
-            if (sharethis_add_js()) {
-              $sharethis = sharethis_get_js($node->title, array(
-                'url' => url('node/'. $node->nid, array('absolute' => TRUE)),
-              ));
+            if($link = theme('sharethis', $node)) {
               $node->content['sharethis_sharethis_this'] = array(
-                '#value' => $sharethis,
+                '#value' => $link,
                 '#weight' => variable_get('sharethis_sharethis_weight', 0),
               );
             }
@@ -142,12 +139,9 @@
   if (!$teaser || variable_get('sharethis_teaser', 1)) {
     if (variable_get('sharethis_sharethis_this_where', 'links') == 'links') {
       if (_sharethis_sharethis_this_show($node->type, $node->nid) && user_access('use share this')) {
-        if (sharethis_add_js()) {
-          $sharethis = sharethis_get_js($node->title, array(
-            'url' => url('node/'. $node->nid, array('absolute' => TRUE)),
-          ));
+        if($link = theme('sharethis', $node)) {
           $links['sharethis_sharethis_this'] = array(
-            'title' => $sharethis,
+            'title' => $link,
             'html' => TRUE,
             'attributes' => array('id' => 'sharethis_'. $node->nid),
           );
@@ -159,6 +153,29 @@
 }
 
 /**
+ * Implementation of hook_theme().
+ */
+function sharethis_theme() {
+  return array(
+    'sharethis' => array(
+      'arguments' => array('node' => NULL),
+    ),
+  );
+}
+
+/**
+ * Implementation of hook_theme().
+ */
+function theme_sharethis($node = NULL) {
+  if (sharethis_add_js()) {
+    $link = sharethis_get_js($node->title, array(
+      'url' => url('node/'. $node->nid, array('absolute' => TRUE)),
+    ));
+    return $link;
+  }
+}
+
+/**
  * Check if the service links should be displayed for the node type/category.
  */
 function _sharethis_sharethis_this_show($type, $nid) {
@@ -208,3 +225,12 @@
   $options['title'] = $title;
   return "<script language='javascript' type='text/javascript'>SHARETHIS.addEntry(". drupal_to_js($options) . ', {button:true} );</script>';
 }
+
+/**
+ * Implementation of hook_views_api().
+ */
+function sharethis_views_api() {
+  return array(
+    'api' => 2,
+  );
+}
\ No newline at end of file
Index: sharethis.views.inc
===================================================================
--- sharethis.views.inc	(revision 0)
+++ sharethis.views.inc	(revision 0)
@@ -0,0 +1,39 @@
+<?php
+// $Id$
+/**
+ * @file
+ * Views integration for sharethis.
+ */
+
+/**
+ * Implementation of hook_views_data().
+ *
+ * @return array
+ */
+function sharethis_views_data() {
+  // sharethis link
+  $data['node']['sharethislink'] = array(
+    'title' => t('ShareThis link'), // The item it appears as on the UI,
+    'help' => t('Link provided by the ShareThis service.'), // The help that appears on the UI,
+    'field' => array(
+      'handler' => 'sharethis_handler_link',
+      'click sortable' => FALSE,
+    )
+  );
+  return $data;
+}
+
+/**
+ * Implementation of hook_views_handlers().
+ *
+ * @return array
+ */
+function sharethis_views_handlers() {
+  return array(
+    'handlers' => array(
+      'sharethis_handler_link' => array(
+        'parent' => 'views_handler_field_node_link',
+      ),
+    ),
+  );
+}
\ No newline at end of file
