? multi_axis_node_show.patch
? multi_axis_node_show_2.patch
Index: fivestar.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/fivestar/fivestar.module,v
retrieving revision 1.18
diff -u -5 -p -u -p -r1.18 fivestar.module
--- fivestar.module	11 May 2009 15:56:23 -0000	1.18
+++ fivestar.module	17 Jun 2009 19:17:34 -0000
@@ -463,11 +463,11 @@ function fivestar_fivestar_widgets() {
  * Adds the fievestar widget to the node view.
  */
 function fivestar_nodeapi(&$node, $op, $teaser, $page) {
   switch ($op) {
     case 'view':
-      if (!in_array($node->build_mode, array(NODE_BUILD_PREVIEW, NODE_BUILD_SEARCH_INDEX)) && !isset($node->modr8_form_teaser) && variable_get('fivestar_'. $node->type, 0)) {
+      if (!in_array($node->build_mode, array(NODE_BUILD_PREVIEW, NODE_BUILD_SEARCH_INDEX)) && !isset($node->modr8_form_teaser) && fivestar_is_enabled('fivestar_'. $node->type)) {
         if ($teaser) {
           $position = variable_get('fivestar_position_teaser_'. $node->type, 'above');
         }
         else {
           $position = variable_get('fivestar_position_'. $node->type, 'above');
@@ -1372,5 +1372,28 @@ function fivestar_get_settings($node_typ
     $settings['labels'][$n] = isset($settings['labels'][$n]) ? $settings['labels'][$n] : t('Give it @star/@count');
   }
 
   return $settings;
 }
+
+/**
+ * Check if nodetype has a fivestar voting tag enabled.
+ *
+ * Since that multi axis votes don't nessesarely have the 'vote' tag enabled,
+ * we need check all of the tags entered at the fivestar admin page.
+ */
+function fivestar_is_enabled($lookup) {
+  // Check if vote tag is enabled since that will be enough in most cases.
+  if (variable_get($lookup, 0)) {
+    return 1;
+  }
+  $tags_txt = variable_get('fivestar_tags', 0);
+  $tags_exploded = explode(',', $tags_txt);
+  foreach ($tags_exploded as $tag) {
+    if (variable_get($lookup . '_' . trim($tag), 0)) {
+      return 1;
+    }
+  }
+  // If we get this far, no match, so return 0.
+  return 0;
+}
