Index: C:/likemind_admin/projects/unit9/efd/website/sites/all/modules/similarterms/similarterms.module
===================================================================
--- C:/likemind_admin/projects/unit9/efd/website/sites/all/modules/similarterms/similarterms.module	(revision 46)
+++ C:/likemind_admin/projects/unit9/efd/website/sites/all/modules/similarterms/similarterms.module	(revision 47)
@@ -59,10 +59,12 @@
  *   integer - node id, leave out to use current page
  * @param $count
  *   integer - how many nodes should we return?
+ * @param $type
+ *   string - type of node to match
  * @return
  *   an array of partial node objects (containing just the parts from the node table)
  */
-function similarterms_list($vid = NULL, $nid = NULL, $count = 5) {
+function similarterms_list($vid = NULL, $nid = NULL, $count = 5, $type = null) {
   if (is_null($nid) && (arg(0) == 'node' && is_numeric(arg(1)))) {
     $nid = arg(1);
   }
@@ -77,6 +79,7 @@
     if (!empty($terms)) {
       //past events
       $pasts = array();
+      $typeclause = $type? sprintf(" AND n.type = '%s' ",db_escape_string($type)): '';
       $result = db_query(
       'SELECT *, COUNT(n.nid) AS ncount
         FROM {node} n
@@ -84,8 +87,9 @@
         WHERE tn.tid IN (%s)
           AND n.nid != %d
           AND n.status = 1
-          AND n.moderate = 0
-        GROUP BY n.nid
+          AND n.moderate = 0'.
+          $typeclause.
+        'GROUP BY n.nid
         ORDER BY ncount DESC, n.created DESC
         LIMIT %d'
         , $terms, $nid, $count);
