diff -upN sites\all\modules\similarterms\similarterms.info modules\similarterms\similarterms.info --- sites\all\modules\similarterms\similarterms.info Fri Sep 07 20:06:46 2007 +++ modules\similarterms\similarterms.info Thu Apr 17 21:02:45 2008 @@ -1,9 +1,10 @@ ; $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 ; Information added by drupal.org packaging script on 2007-09-08 -version = "5.x-1.x-dev" +version = "6.x-1.x-dev" project = "similarterms" datestamp = "1189210006" diff -upN sites\all\modules\similarterms\similarterms.module modules\similarterms\similarterms.module --- sites\all\modules\similarterms\similarterms.module Fri Sep 07 17:40:10 2007 +++ modules\similarterms\similarterms.module Thu Apr 17 21:02:25 2008 @@ -7,6 +7,30 @@ * Similar By Terms module displays a block with similar content * based on taxonomy terms. */ + + /** +* 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 = '
'. t("Displays a block with similar content based on taxonomy terms.") .'
'; + 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(). @@ -69,10 +93,10 @@ 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))); } else { - $terms = implode(',', array_keys(taxonomy_node_get_terms($nid))); + $terms = implode(',', array_keys(taxonomy_node_get_terms(node_load($nid)))); } if (!empty($terms)) { //past events @@ -99,18 +123,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 .= "