/[drupal]/contributions/modules/vote_up_down/vud.theme.inc
ViewVC logotype

Diff of /contributions/modules/vote_up_down/vud.theme.inc

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.1.2.21, Mon Aug 17 17:23:39 2009 UTC revision 1.1.2.22, Wed Aug 19 05:38:45 2009 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: vud.theme.inc,v 1.1.2.20 2009/08/16 19:22:05 lut4rp Exp $  // $Id: vud.theme.inc,v 1.1.2.21 2009/08/17 17:23:39 lut4rp Exp $
3    
4  /**  /**
5   * @file   * @file
# Line 61  function vud_widget_proxy($cid, $type, $ Line 61  function vud_widget_proxy($cid, $type, $
61      'function' => 'sum'      'function' => 'sum'
62    );    );
63    $vote_result = (int) votingapi_select_single_result_value($result_criteria);    $vote_result = (int) votingapi_select_single_result_value($result_criteria);
64      $variables['unsigned_points'] = $vote_result;
65    
66    if ($vote_result > 0) {    if ($vote_result > 0) {
67      $variables['class'] = 'positive';      $variables['class'] = 'positive';
# Line 75  function vud_widget_proxy($cid, $type, $ Line 76  function vud_widget_proxy($cid, $type, $
76        $variables['class'] = 'neutral';        $variables['class'] = 'neutral';
77      }      }
78    }    }
79    $variables['label'] = format_plural($vote_result, 'vote', 'votes');    $variables['vote_label'] = format_plural($vote_result, 'vote', 'votes');
   $variables['label_points'] = format_plural($vote_result, '1 vote', '@count votes');  
80    
81    $output = $render_function($template_file, $variables);    $output = $render_function($template_file, $variables);
82    return $output;    return $output;
# Line 102  function vud_votes_proxy($cid, $type, $t Line 102  function vud_votes_proxy($cid, $type, $t
102      'function' => 'sum'      'function' => 'sum'
103    );    );
104    $vote_result = (int) votingapi_select_single_result_value($criteria);    $vote_result = (int) votingapi_select_single_result_value($criteria);
105      $variables['unsigned_points'] = $vote_result;
106    
107    if ($vote_result > 0) {    if ($vote_result > 0) {
108      $variables['class'] = 'positive';      $variables['class'] = 'positive';
# Line 116  function vud_votes_proxy($cid, $type, $t Line 117  function vud_votes_proxy($cid, $type, $t
117        $variables['class'] = 'neutral';        $variables['class'] = 'neutral';
118      }      }
119    }    }
120    $variables['label'] = format_plural($vote_result, 'vote', 'votes');    $variables['vote_label'] = format_plural($vote_result, 'vote', 'votes');
   $variables['label_points'] = format_plural($vote_result, '1 vote', '@count votes');  
121    
122    vud_add_css($widget_theme);  // Search and add the CSS files.    vud_add_css($widget_theme);  // Search and add the CSS files.
123    vud_add_js($widget_theme);   // Search and add the JS files.    vud_add_js($widget_theme);   // Search and add the JS files.

Legend:
Removed from v.1.1.2.21  
changed lines
  Added in v.1.1.2.22

  ViewVC Help
Powered by ViewVC 1.1.2