Alternative style doesn't work

yaron24 - September 15, 2009 - 06:58
Project:Vote Up/Down
Version:6.x-1.0-beta6
Component:Code
Category:bug report
Priority:critical
Assigned:ingo86
Status:active
Description

vote_up_down_widget$style outputs as vote_up_down_widgetalt instead of vote_up_down_widget_alt
so alternative style doesn't work

<?php
function vote_up_down_widget_form($node) {
 
$return = '';
  if (
user_access('view up/down votes')) {
   
$node_type = in_array($node->type, variable_get('vote_up_down_node_types', array()), TRUE);
    if (
$node_type) {
     
$style = variable_get('vote_up_down_widget_style_node', 0) == 1 ? '_alt' : '';
      if (
$teaser && variable_get('vote_up_down_widget_node', 0) && variable_get('vote_up_down_widget_node', 0) != 2) {
       
$return = theme("vote_up_down_widget$style", $node->nid, 'node');
      }
      else if (!
$teaser && variable_get('vote_up_down_widget_node', 0) > 1) {
       
$return = theme("vote_up_down_widget$style", $node->nid, 'node');
      }
    }
  }
  return
$return;
}
?>

AttachmentSize
patch.diff685 bytes

#1

ingo86 - September 15, 2009 - 08:59
Assigned to:Anonymous» ingo86

Thank you. I will add that asap and i will release a new beta.

 
 

Drupal is a registered trademark of Dries Buytaert.