diff -urp 5.x-2.x-dev/share.info 6.x-2.x-dev/share.info
--- 5.x-2.x-dev/share.info	2008-04-12 10:11:20.000000000 +1000
+++ 6.x-2.x-dev/share.info	2008-06-10 08:29:35.000000000 +1000
@@ -1,8 +1,9 @@
 ; $Id: share.info,v 1.1.4.1 2008/03/25 21:02:44 greenskin Exp $
 name = Share
-description = "Makes Service Links module more eye appealing and adds some extra features."
+description = Makes Service Links module more eye appealing and adds some extra features.
+core = 6.x
 ; Information added by drupal.org packaging script on 2008-04-12
-version = "5.x-2.x-dev"
+version = "6.x-2.x-dev"
 project = "share"
 datestamp = "1207959080"
 
diff -urp 5.x-2.x-dev/share.install 6.x-2.x-dev/share.install
--- 5.x-2.x-dev/share.install	2008-03-26 08:02:44.000000000 +1100
+++ 6.x-2.x-dev/share.install	2008-06-10 08:56:34.000000000 +1000
@@ -1,6 +1,10 @@
 <?php
 // $Id: share.install,v 1.3.2.1 2008/03/25 21:02:44 greenskin Exp $
 
+/**
+ * @file
+ */
+
 function share_install() {
   variable_del('service_links_in_node');
 }
@@ -12,18 +16,19 @@ function share_update_1() {
       variable_set('service_links_in_share_links', variable_get('service_links_in_links', 0));
       variable_del('service_links_in_links');
       variable_set('service_links_in_share_node', 0);
-    } else if (variable_get('service_links_in_node', 2) > '0') {
+    }
+    else if (variable_get('service_links_in_node', 2) > '0') {
       variable_set('service_links_in_share_node', variable_get('service_links_in_node', 2));
       variable_del('service_links_in_node');
     }
     variable_del('share_service_links');
   }
-  
+
   // For Forward module
   if (variable_get('forward_form_type', 'link') == 'link' && variable_get('share_forward', 0)) {
     variable_set('forward_form_type', 'share_link');
   }
-  
+
   if (variable_get('forward_form_type', 'link') == 'share') {
     variable_set('forward_form_type', 'share_form');
   }
@@ -31,11 +36,11 @@ function share_update_1() {
   if (variable_get('share_forward_form', 0)) {
     variable_set('share_forward', variable_get('share_forward_form', 0));
   }
-  
+
   // For Share Block
   variable_get('share_block_collapsed', 1);
   variable_del('share_block_link');
-  
+
   variable_del('share_tab_email');
   variable_del('share_tab_social');
   return array();
@@ -44,10 +49,10 @@ function share_update_1() {
 function share_update_2() {
   variable_set('share_node_types', variable_get('share_share_this_node_types', array()));
   variable_del('share_share_this_node_types');
-  
+
   variable_set('share_category_types', variable_get('share_share_this_category_types', array()));
   variable_del('share_share_this_category_types');
-  
+
   variable_set('share_where', variable_get('share_share_this_where', 0));
   variable_del('share_share_this_where');
   return array();
@@ -59,8 +64,8 @@ function share_uninstall() {
   variable_del('share_forward');
   variable_del('share_forward_form');
   variable_del('share_service_links');
-  
+
   variable_del('share_effects');
   variable_del('share_tab_email');
   variable_del('share_tab_social');
-}
\ No newline at end of file
+}
diff -urp 5.x-2.x-dev/share.module 6.x-2.x-dev/share.module
--- 5.x-2.x-dev/share.module	2008-04-12 08:48:47.000000000 +1000
+++ 6.x-2.x-dev/share.module	2008-06-10 09:20:32.000000000 +1000
@@ -2,6 +2,10 @@
 // $Id: share.module,v 1.27.2.4 2008/04/11 22:48:47 greenskin Exp $
 
 /**
+ * @file
+ */
+
+/**
  * Implementation of hook_perm().
  */
 function share_perm() {
@@ -9,31 +13,39 @@ function share_perm() {
 }
 
 /**
+ * Implementation of hook_theme().
+ */
+function share_theme() {
+  return array(
+    'share_page' => array(
+      'arguments' => array('data' => NULL),
+    ),
+    'share_css' => array(
+      'arguments' => array('block' => FALSE),
+    ),
+  );
+}
+
+/**
  * Implementation of hook_menu().
  */
-function share_menu($may_cache) {
-  $items = array();
-  if (!$may_cache) {
-    if (is_numeric($arg1 = arg(1))) {
-      $items[] = array(
-        'path' => 'share',
-        'title' => t("Share"),
-        'description' => t("Share this page"),
-        'callback' => 'share_page',
-        'callback arguments' => array($arg1),
-        'type' => MENU_CALLBACK,
-        'access' => node_access('view', node_load($arg1))
-      );
-    }
-  } else {
-    $items[] = array(
-      'path' => 'admin/settings/share',
-      'title' => t('Share'),
-      'callback' => 'drupal_get_form',
-      'callback arguments' => array('share_settings'),
-      'access' => user_access('administer share')
-    );
-  }
+function share_menu() {
+
+  $items['share/%'] = array(
+    'title' => "Share",
+    'description' => "Share this page",
+    'page callback' => 'share_page',
+    'page arguments' => array(1),
+    'type' => MENU_CALLBACK,
+    'access callback' => 'node_access',
+    'access arguments' => array('view', 1),
+  );
+  $items['admin/settings/share'] = array(
+    'title' => 'Share',
+    'page callback' => 'drupal_get_form',
+    'page arguments' => array('share_settings'),
+    'access arguments' => array('administer share')
+  );
   return $items;
 }
 
@@ -82,7 +94,7 @@ function share_settings() {
     '#default_value' => variable_get('share_view', 0),
     '#options' => array(t('Teasers'), t('Full-page'), t('Teasers and full-page'))
   );
-  
+
   // Share This
   $form['share_this_settings'] = array(
     '#type' => 'fieldset',
@@ -98,7 +110,7 @@ function share_settings() {
     '#description' => t('Javascript code provided by Share This. You can generate your own code !here.', array('!here' => l(t('here'), 'http://sharethis.com/publisher?type=stapi'))),
     '#default_value' => variable_get('share_share_this_code', $share_code)
   );
-  
+
   // SHARE
   $form['share'] = array(
     '#type' => 'fieldset',
@@ -151,18 +163,18 @@ function share_settings() {
     '#default_value' => variable_get('share_link_codes', array('direct' => 0, 'html' => 0, 'forum' => 0)),
     '#options' => array('direct' => t("Direct URL"), 'html' => t("HTML Code"), 'forum' => t("Forum Code"))
   );
-  
+
   return system_settings_form($form);
 }
 
 /**
  * Implementation of hook_form_alter().
  */
-function share_form_alter($form_id, &$form) {
+function share_form_alter(&$form, &$form_state, $form_id) {
   if ($form_id == 'service_links_admin_settings') {
-    drupal_add_js(drupal_get_path('module', 'share').'/js/settings.js');
+    drupal_add_js(drupal_get_path('module', 'share') .'/js/settings.js');
     $form['how_to_show_the_links']['service_links_in_node']['#default_value'] = variable_get('service_links_in_node', 0);
-    
+
     $form['how_to_show_the_links']['share'] = array(
       '#type' => 'fieldset',
       '#title' => t("Share"),
@@ -190,12 +202,12 @@ function share_form_alter($form_id, &$fo
       '#value' => '<div id="share_settings_item"></div>'
     );
     $form['how_to_show_the_links']['service_links_style']['#weight'] = 1;
-    $form['#validate']['share_service_links_validate'] = array();
+    $form['#element_validate']['share_service_links_validate'] = array();
   }
   if ($form_id == 'forward_admin_settings') {
     $form['forward_options']['forward_form_type']['#options']['share_link'] = 'Link in Share';
     $form['forward_options']['forward_form_type']['#options']['share_form'] = 'Form in Share';
-    
+
     $form['share']['share_forward'] = array(
       '#type' => 'checkbox',
       '#title' => t("Share Forward Form"),
@@ -206,26 +218,26 @@ function share_form_alter($form_id, &$fo
   }
 }
 
-function share_service_links_validate($form_id, $form_values) {
-  if ($form_values['service_links_in_share_node'] > 0) {
-    if ($form_values['service_links_in_links'] > 0) {
+function share_service_links_validate($form, &$form_state) {
+  if ($form_state['values']['service_links_in_share_node'] > 0) {
+    if ($form_state['values']['service_links_in_links'] > 0) {
       form_set_error('service_links_in_links', "'Share service links in node' cannot be enabled if 'Service links in links' is also enabled.");
     }
-    if ($form_values['service_links_in_node'] > 0) {
+    if ($form_state['values']['service_links_in_node'] > 0) {
       form_set_error('service_links_in_node', "'Share service links in node' cannot be enabled if 'Service links in node' is also enabled.");
     }
-    if ($form_values['service_links_in_share_links'] > 0) {
+    if ($form_state['values']['service_links_in_share_links'] > 0) {
       form_set_error('service_links_in_share_links', "'Share service links in node' cannot be enabled if 'Share service links in links' is also enabled.");
     }
   }
-  if ($form_values['service_links_in_share_links'] > 0) {
-    if ($form_values['service_links_in_links'] > 0) {
+  if ($form_state['values']['service_links_in_share_links'] > 0) {
+    if ($form_state['values']['service_links_in_links'] > 0) {
       form_set_error('service_links_in_links', "'Share service links in links' cannot be enabled if 'Service links in links' is also enabled.");
     }
-    if ($form_values['service_links_in_node'] > 0) {
+    if ($form_state['values']['service_links_in_node'] > 0) {
       form_set_error('service_links_in_node', "'Share service links in links' cannot be enabled if 'Service links in node' is also enabled.");
     }
-    if ($form_values['service_links_in_share_node'] > 0) {
+    if ($form_state['values']['service_links_in_share_node'] > 0) {
       form_set_error('service_links_in_share_node', "'Share service links in links' cannot be enabled if 'Share service links in node' is also enabled.");
     }
   }
@@ -262,9 +274,9 @@ function share_nodeapi(&$node, $op, $tea
               $node->content['share_share_this'] = array(
                 '#value' => "<script language='javascript' type='text/javascript'>
                   SHARETHIS.addEntry({
-                    url:'".url(drupal_get_path_alias('node/'.$node->nid), NULL, NULL, TRUE)."',
-                    title:'".$node->title."'
-                  }, {button:true} );
+                    url:'". url(drupal_get_path_alias('node/'. $node->nid), array('absolute' => TRUE)) ."',
+                    title:'". $node->title ."'
+                  }, {button:true} );c
                   </script>",
                 '#weight' => 10
               );
@@ -273,7 +285,7 @@ function share_nodeapi(&$node, $op, $tea
           break;
         case "share":
           if (variable_get('service_links_in_share_node', 2) > 0) {
-            $links_show = _service_links_show($node->type, $node->nid);
+            $links_show = _service_links_show($node);
             if ($links_show && user_access('use service links')) {
               $share_view = variable_get('service_links_in_share_node', 2);
               switch ($share_view) {
@@ -333,12 +345,12 @@ function share_link($type, $node = NULL,
           $links['share_share_this'] = array(
             'title' => "<script language='javascript' type='text/javascript'>
               SHARETHIS.addEntry({
-                url:'".url(drupal_get_path_alias('node/'.$node->nid), NULL, NULL, TRUE)."',
-                title:'".$node->title."'
+                url:'". url(drupal_get_path_alias('node/'. $node->nid), array('absolute' => TRUE)) ."',
+                title:'". $node->title ."'
               }, {button:true} );
               </script>",
             'html' => TRUE,
-            'attributes' => array('id' => 'share_'.$node->nid)
+            'attributes' => array('id' => 'share_'. $node->nid)
           );
           return $links;
         }
@@ -346,23 +358,23 @@ function share_link($type, $node = NULL,
       break;
     case "share":
       if (variable_get('service_links_in_share_links', 0) > 0) {
-        $links_show = _service_links_show($node->type, $node->nid);
+        $links_show = _service_links_show($node);
         if ($links_show && user_access('use service links')) {
           $links = array();
           $share_view = variable_get('service_links_in_share_links', 0);
           switch ($share_view) {
             case "1":
               if ($teaser) {
-                $links['share_group_'.$node->nid.' share'] = share_display('link', $node);
+                $links['share_group_'. $node->nid .' share'] = share_display('link', $node);
               }
               break;
             case "2":
               if (!$teaser) {
-                $links['share_group_'.$node->nid.' share'] = share_display('link', $node);
+                $links['share_group_'. $node->nid .' share'] = share_display('link', $node);
               }
               break;
             case "3":
-              $links['share_group_'.$node->nid.' share'] = share_display('link', $node);
+              $links['share_group_'. $node->nid .' share'] = share_display('link', $node);
               break;
           }
           return $links;
@@ -411,8 +423,8 @@ function share_block($op = 'list', $delt
           if (user_access('use service links')) {
             if (arg(0) == 'node' && is_numeric(arg(1)) && !arg(2)) {
               theme('share_css', TRUE);
-              $node = node_load(arg(1));
-              $links_show = _service_links_show($node->type, $node->nid);
+              $node = menu_get_object();
+              $links_show = _service_links_show($node);
               if ($links_show) {
                 $block['content'] = $content = share_display('block', $node);
               }
@@ -424,7 +436,7 @@ function share_block($op = 'list', $delt
   }
 }
 
-function share_display($type,$node) {
+function share_display($type, $node) {
   static $share = NULL;
   if ($share == NULL) {
     $share = array(
@@ -438,7 +450,7 @@ function share_display($type,$node) {
   switch ($type) {
     case 'node':
       $node->content['service_links'] = array(
-        '#value' => '<div class="share">'.share_render($node).'</div>',
+        '#value' => '<div class="share">'. share_render($node) .'</div>',
         '#weight' => 10
       );
       return $node;
@@ -446,11 +458,11 @@ function share_display($type,$node) {
       $link = array(
         'title' => share_render($node, TRUE),
         'html' => TRUE,
-        'attributes' => array('id' => 'share_'.$node->nid)
+        'attributes' => array('id' => 'share_'. $node->nid)
       );
       return $link;
     case 'block':
-      return '<div class="share_block">'.share_render($node, FALSE, TRUE).'</div>';
+      return '<div class="share_block">'. share_render($node, FALSE, TRUE) .'</div>';
   }
 }
 
@@ -459,31 +471,32 @@ function share_render($node, $is_link = 
   $links = '';
   foreach ($service_links as $service) {
     if (!is_array($service)) {
-      $links.= $service;
+      $links .= $service;
     }
   }
   $output = '';
   if (!empty($links)) {
     theme('share_css');
     if (variable_get('share_effects', 0)) {
-      drupal_add_js(drupal_get_path('module', 'share').'/js/share_effects.js');
-    } else {
-      drupal_add_js(drupal_get_path('module', 'share').'/js/share.js');
+      drupal_add_js(drupal_get_path('module', 'share') .'/js/share_effects.js');
+    }
+    else {
+      drupal_add_js(drupal_get_path('module', 'share') .'/js/share.js');
     }
     $nid = $node->nid;
     if ($is_block) {
       $nid = 'block';
     }
     if (!$is_link) {
-      $output.= '<div id="share_'.$nid.'">';
+      $output .= '<div id="share_'. $nid .'">';
     }
-    $output.= l(t('Share'), 'share/'.$node->nid, array('class' => 'share_link', 'onclick' => 'return false;'));
-    $output.= '<div class="share_popup" style="display: none;">';
-      $output.= _share_get_tabs();
-      $output.= _share_get_content($links, $node->nid);
-    $output.= '</div>';
+    $output .= l(t('Share'), 'share/'. $node->nid, array('attributes' => array('class' => 'share_link', 'onclick' => 'return false;')));
+    $output .= '<div class="share_popup" style="display: none;">';
+    $output .= _share_get_tabs();
+    $output .= _share_get_content($links, $node->nid);
+    $output .= '</div>';
     if (!$is_link) {
-      $output.= '</div>';
+      $output .= '</div>';
     }
   }
   return $output;
@@ -493,61 +506,61 @@ function _share_get_tabs() {
   $codes = NULL;
   $count = array_count_values(variable_get('share_link_codes', array('direct' => 0, 'html' => 0, 'forum' => 0)));
   if ($count[0] < 3 || !isset($count[0])) {
-    $codes = '<li class="share_codes share_tab">'.l(t('Link Codes'), '', array('onclick' => 'return false;')).'</li>';
+    $codes = '<li class="share_codes share_tab">'. l(t('Link Codes'), '', array('attributes' => array('onclick' => 'return false;'))) .'</li>';
   }
   $forward = NULL;
   $form_type = variable_get('forward_form_type', 'link');
   if (module_exists('forward') && user_access('access forward') && ($form_type = 'share_form' || variable_get('share_forward', 0))) {
-    $forward = '<li class="share_forward share_tab">'.l(t('E-Mail'), '', array('onclick' => 'return false;')).'</li>';
+    $forward = '<li class="share_forward share_tab">'. l(t('E-Mail'), '', array('attributes' => array('onclick' => 'return false;'))) .'</li>';
   }
   if (variable_get('share_forward', 0)) {
     $close = NULL;
     if (variable_get('share_block_collapsible', 1)) {
-      $close = '<a href="" class="share_close" onclick="return false;">'.t('Close').'</a>';
+      $close = '<a href="" class="share_close" onclick="return false;">'. t('Close') .'</a>';
     }
-    return $close.
+    return $close .
       '<ul class="share_menu">'.
-      '<li class="share_service_links share_tab selected">'.l(t('Social Web'), '', array('onclick' => 'return false;')).'</li>'.
-      $forward.
-      $codes.
+      '<li class="share_service_links share_tab selected">'. l(t('Social Web'), '', array('attributes' => array('onclick' => 'return false;'))) .'</li>'.
+      $forward .
+      $codes .
       '</ul>';
   }
 }
 
 function _share_get_content($links, $nid) {
   $output = '<div class="share_content">';
-    $output.= '<div class="share_service_links" style="display: block;">'.$links.'</div>';
-    $output.= '<div class="clear"></div>';
-    $form_type = variable_get('forward_form_type', 'link');
-    if (module_exists('forward') && user_access('access forward') && ($form_type == 'share_form' || variable_get('share_forward', 0))) {
-      $output.= '<div class="share_forward" style="display: none;">'.drupal_get_form('share_form_'.$nid, $nid).'</div>';
-    }
-    $link_codes = variable_get('share_link_codes', array('direct' => 0, 'html' => 0, 'forum' => 0));
-    $count = array_count_values($link_codes);
-    if ($count[0] < 3 || !isset($count[0])) {
-      drupal_add_js(drupal_get_path('module', 'share').'/js/link_codes.js');
-      $output.= '<div class="share_codes" style="display: none;">';
-      foreach ($link_codes as $code => $value) {
-        if ($value != '0') {
-          $output.= _share_get_link_codes($code, $nid);
-        }
+  $output .= '<div class="share_service_links" style="display: block;">'. $links .'</div>';
+  $output .= '<div class="clear"></div>';
+  $form_type = variable_get('forward_form_type', 'link');
+  if (module_exists('forward') && user_access('access forward') && ($form_type == 'share_form' || variable_get('share_forward', 0))) {
+    $output .= '<div class="share_forward" style="display: none;">'. drupal_get_form('share_form_'. $nid, $nid) .'</div>';
+  }
+  $link_codes = variable_get('share_link_codes', array('direct' => 0, 'html' => 0, 'forum' => 0));
+  $count = array_count_values($link_codes);
+  if ($count[0] < 3 || !isset($count[0])) {
+    drupal_add_js(drupal_get_path('module', 'share') .'/js/link_codes.js');
+    $output .= '<div class="share_codes" style="display: none;">';
+    foreach ($link_codes as $code => $value) {
+      if ($value != '0') {
+        $output .= _share_get_link_codes($code, $nid);
       }
-      $output.= '</div>';
     }
-  $output.= '</div>';
+    $output .= '</div>';
+  }
+  $output .= '</div>';
   return $output;
 }
 
 function _share_get_link_codes($op, $nid) {
   $node = node_load($nid);
-  $alias = drupal_get_path_alias('node/'.$node->nid);
+  $alias = drupal_get_path_alias('node/'. $node->nid);
   switch ($op) {
     case "direct":
-      return '<div class="share_link_code form-item"><label for="direct_url">Direct URL</label><input id="direct_url" name="direct_url" type="text" onClick="highlight(this);" value="http://'.$_SERVER['HTTP_HOST'].base_path().$alias.'" size="40" /></div>';
+      return '<div class="share_link_code form-item"><label for="direct_url">Direct Url</label><input id="direct_url" name="direct_url" type="text" onClick="highlight(this);" value="http://'. $_SERVER['HTTP_HOST'] . base_path() . $alias .'" size="40" /></div>';
     case "html":
-      return '<div class="share_link_code form-item"><label for="html_code">HTML Code</label><input id="html_code" name="html_code" type="text" onClick="highlight(this);" value="&lt;a href=&quot;http://'.$_SERVER['HTTP_HOST'].base_path().$alias.'&quot;&gt;Click Here To view '.$node->title.'!&lt;/a&gt;" size="40" /></div>';
+      return '<div class="share_link_code form-item"><label for="html_code">HTML Code</label><input id="html_code" name="html_code" type="text" onClick="highlight(this);" value="&lt;a href=&quot;http://'. $_SERVER['HTTP_HOST'] . base_path() . $alias .'&quot;&gt;Click Here To view '. $node->title .'!&lt;/a&gt;" size="40" /></div>';
     case "forum":
-      return '<div class="share_link_code form-item"><label for="forum_code">Forum Code</label><input id="forum_code" name="forum_code" type="text" onClick="highlight(this);" value="[url=http://'.$_SERVER['HTTP_HOST'].base_path().$alias.']Click Here To view '.$node->title.'![/url]" size="40" /></div>';
+      return '<div class="share_link_code form-item"><label for="forum_code">Forum Code</label><input id="forum_code" name="forum_code" type="text" onClick="highlight(this);" value="[url=http://'. $_SERVER['HTTP_HOST'] . base_path() . $alias .']Click Here To view '. $node->title .'![/url]" size="40" /></div>';
   }
 }
 
@@ -563,7 +576,7 @@ function share_form($nid = null) {
   else {
     $emailtype = 'postcard';
   }
-  
+
   $form['yemail'] = array(
     '#type' => 'textfield',
     '#title' => t('Your Email'),
@@ -620,19 +633,19 @@ function share_form($nid = null) {
 }
 
 function share_forms() {
-  # get the form id
+  // get the form id
   $args = func_get_args();
   $form_id = $args[0][0];
 
-  # Ensure we map a callback for our form and not something else
+  // Ensure we map a callback for our form and not something else
   $forms = array();
   if (strpos($form_id, "share_form") === 0) {
 
-    # Let the forms API know where to get the form data corresponding
-    # to this form id.
+    // Let the forms API know where to get the form data corresponding
+    // to this form id.
     $forms[$form_id] = array('callback' => 'share_form');
   }
-  
+
   return $forms;
 }
 
@@ -640,7 +653,7 @@ function share_page($nid) {
   $node = node_load($nid);
   $data->description = t("From this page you can share %title to a social bookmarking site or email a link to the page.", array('%title' => $node->title));
   if (variable_get('service_links_in_share_node', 2) > 0 || variable_get('service_links_in_share_links', 0) > 0) {
-    $links_show = _service_links_show($node->type, $node->nid);
+    $links_show = _service_links_show($node);
     if ($links_show && user_access('use service links')) {
       $data->social['title'] = t("Social Web");
       $data->social['links'] = service_links_render($node, TRUE);
@@ -650,7 +663,7 @@ function share_page($nid) {
       }
       $data->node = node_view($node);
 
-      return theme('share_page',$data);
+      return theme('share_page', $data);
     }
   }
   drupal_not_found();
@@ -660,31 +673,32 @@ function theme_share_page($data) {
   $links = '<ul style="width: 100px">';
   foreach ($data->social['links'] as $v) {
     $html = isset($v['html']) && $v['html'];
-    $links .= "<li>".l($v['title'],$v['href'],$v['attributes'],$v['query'],$v['fragment'],FALSE,$html)."</li>";
+    $links .= "<li>". l($v['title'], $v['href'], array('attributes' => $v['attributes'], 'query' => $v['query'], 'fragment' => $v['fragment'], 'html' => $html)) ."</li>";
   }
   $links .= '</ul>';
   $output = $data->description;
-  $output .= "<table><thead><tr><th>".$data->social['title']."</th>";
+  $output .= "<table><thead><tr><th>". $data->social['title'] ."</th>";
   if ($data->forward['title']) {
-    $output .= "<th>".$data->forward['title']."</th>";
+    $output .= "<th>". $data->forward['title'] ."</th>";
   }
   $output .= "</tr></thead>";
-  $output .= "<tbody><tr><td valign='top'>".$links."</td>";
+  $output .= "<tbody><tr><td valign='top'>". $links ."</td>";
   if ($data->forward['form']) {
-    $output .= "<td>".$data->forward['form']."</td>";
+    $output .= "<td>". $data->forward['form'] ."</td>";
   }
   $output .= "</tr>";
-  $colspan = $data->forward?" colspan='2'":NULL;
-  $output .= "<tr><td$colspan>".$data->node."</td></tr></tbody></table>";
-  
+  $colspan = $data->forward ? " colspan='2'" : NULL;
+  $output .= "<tr><td$colspan>". $data->node ."</td></tr></tbody></table>";
+
   return $output;
 }
 
 function theme_share_css($block = FALSE) {
   if (!$block) {
-    drupal_add_css(drupal_get_path('module', 'share'). '/share.css', 'theme', 'screen');
-  } else {
-    drupal_add_css(drupal_get_path('module', 'share'). '/share_block.css', 'theme', 'screen');
+    drupal_add_css(drupal_get_path('module', 'share') .'/share.css', 'theme', 'screen');
+  }
+  else {
+    drupal_add_css(drupal_get_path('module', 'share') .'/share_block.css', 'theme', 'screen');
   }
 }
 
@@ -695,7 +709,7 @@ function _share_show($type, $nid) {
   $links_show = FALSE;
   $node_type = in_array($type, variable_get('share_node_types', array()), TRUE);
   if (module_exists('taxonomy')) {
-    $terms = taxonomy_node_get_terms($nid);
+    $terms = taxonomy_node_get_terms(node_load($nid));
     foreach ($terms as $term) {
       $category_type = in_array($term->tid, variable_get('share_category_types', array()), FALSE);
     }
@@ -714,7 +728,7 @@ function _share_service_links_where() {
     'Service Links in Node' => variable_get('service_links_in_node', 0),
     'Service Links in Links' => variable_get('service_links_in_links', 0)
   );
-  
+
   $output = array();
   foreach ($where as $k => $v) {
     if ($v > 0) {
@@ -734,4 +748,4 @@ function _share_service_links_where() {
   }
   $output = implode('<br />', $output);
   return $output;
-}
\ No newline at end of file
+}
