diff -urp -N similarterms5/README.txt similarterms/README.txt
--- similarterms5/README.txt	2007-06-06 17:53:52.000000000 -0400
+++ similarterms/README.txt	2008-05-07 14:38:20.000000000 -0400
@@ -1,4 +1,4 @@
-$Id: README.txt,v 1.1.2.2 2007/06/06 21:53:52 jjeff Exp $
+$Id: README.txt,v 1.1.2.1 2007/06/06 21:43:25 jjeff Exp $
 
 Similar By Terms (similarterms.module)
 by Jeff Robbins
@@ -22,4 +22,4 @@ Now when you go to the page for a tagged
 up displaying other content in descending order of common tags (terms).
 
 We're using this on Lullabot.com, click on any of the articles at 
-http://www.lullabot.com/articles in order to see the "Similar" block.
\ No newline at end of file
+http://www.lullabot.com/articles in order to see the "Similar" block.
diff -urp -N similarterms5/similarterms.info similarterms/similarterms.info
--- similarterms5/similarterms.info	2007-09-07 20:06:46.000000000 -0400
+++ similarterms/similarterms.info	2008-05-07 18:50:40.000000000 -0400
@@ -1,9 +1,9 @@
 ; $Id: similarterms.info,v 1.1.2.1 2007/06/06 21:43:25 jjeff Exp $
 name = Similar By Terms
 description = "Display a block of other content that is similar by keywords (taxonomy terms)."
-
+core = 6.x
+version = "6.x-1.x-dev"
 ; Information added by drupal.org packaging script on 2007-09-08
-version = "5.x-1.x-dev"
 project = "similarterms"
 datestamp = "1189210006"
 
diff -urp -N similarterms5/similarterms.module similarterms/similarterms.module
--- similarterms5/similarterms.module	2007-09-07 17:40:10.000000000 -0400
+++ similarterms/similarterms.module	2008-05-10 22:26:41.000000000 -0400
@@ -9,6 +9,31 @@
  */
 
 /**
+* Display help and module information
+* @param path which path of the site we're displaying help
+* @param arg array that holds the current path as would be returned from arg() function
+* @return help text for the path
+*/
+function similarterms_help($path, $arg) {
+  $output = '';
+  switch ($path) {
+    case "admin/help#similarterms":
+      $output = '<p>'.  t("Displays a block with similar content based on taxonomy terms.") .'</p>';
+      break;
+  }
+  return $output;
+} // function similarterms_help
+
+/**
+ * Valid permissions for this module
+ * @return array An array of valid permissions for the onthisdate module
+ */
+function similarterms_perm() {
+  return array('access similarterms content', 'administer similarterms content');
+} // function similarterms_perm()
+
+
+/**
  * Implementation of hook_block().
  */
 function similarterms_block($op = 'list', $delta = 0, $edit = array()) {
@@ -40,11 +65,11 @@ function similarterms_block($op = 'list'
   else if ($op == 'view') {
     if ($delta == 0) {
       $block['subject'] = t('Similar');
-      $block['content'] = theme_similarterms(similarterms_list());
+      $block['content'] = theme('similarterms', similarterms_list());
     }
     else {
       $block['subject'] = t('Similar');
-      $block['content'] = theme_similarterms(similarterms_list($delta));
+      $block['content'] = theme('similarterms', similarterms_list($delta));
     }
     return $block;
   }
@@ -69,10 +94,12 @@ function similarterms_list($vid = NULL, 
   $nodes = array();
   if (!is_null($nid)) {
     if (!is_null($vid)) {
-      $terms = implode(',', array_keys(taxonomy_node_get_terms_by_vocabulary($nid, $vid)));
+      $terms = implode(',', array_keys(taxonomy_node_get_terms_by_vocabulary(node_load($nid), $vid)));
+      $count = variable_get('simterms_count_'. $vid, 5);
     }
     else {
-      $terms = implode(',', array_keys(taxonomy_node_get_terms($nid)));
+      $terms = implode(',', array_keys(taxonomy_node_get_terms(node_load($nid))));
+      $count = variable_get('simterms_count_0', 5);
     }
     if (!empty($terms)) {
       //past events
@@ -99,18 +126,13 @@ function similarterms_list($vid = NULL, 
 
 /**
  * Theme function for similar block
- * note that $nodes is a list of node parts from the 'node' data
- * these are not complete node_load() objects
  *
- * @param array $nodes
  */
-function theme_similarterms($nodes) {
-  if (!empty($nodes)) {
-    $output .= "<ul>\n";
-    foreach ($nodes as $node) {
-      $output .= '<li>'. l($node->title, 'node/'. $node->nid) ."</li>\n";
-    }
-    $output .= "</ul>\n";
-  }
-  return $output;
-}
\ No newline at end of file
+function similarterms_theme() {
+  return array(
+    'similarterms' => array(
+      'template'  => 'similarterms',
+      'arguments' => array('items' => NULL),
+       ),
+  );
+}
diff -urp -N similarterms5/similarterms.tpl.php similarterms/similarterms.tpl.php
--- similarterms5/similarterms.tpl.php	1969-12-31 19:00:00.000000000 -0500
+++ similarterms/similarterms.tpl.php	2008-05-07 18:32:09.000000000 -0400
@@ -0,0 +1,21 @@
+<?php
+// $Id$
+
+/**
+ * @file simterms.tpl.php
+ *
+ * Theme implementation to display a list of related content.
+ *
+ * Available variables:
+ * - $items: the list.
+ */
+if ($items) {
+?>
+       <ul>
+       <?php foreach ($items as $node) { ?>
+               <li><?php print l($node->title, 'node/'. $node->nid) ?></li>
+       <?php } ?>
+       </ul>
+<?php
+}
+?>
