| 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 |
| 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'; |
| 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; |
| 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'; |
| 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. |