/[drupal]/contributions/modules/fivestar/fivestar.module
ViewVC logotype

Diff of /contributions/modules/fivestar/fivestar.module

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

revision 1.29, Thu Oct 22 19:58:18 2009 UTC revision 1.30, Thu Oct 22 19:58:56 2009 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: fivestar.module,v 1.28 2009/10/22 19:57:13 ezrag Exp $  // $Id: fivestar.module,v 1.29 2009/10/22 19:58:18 ezrag Exp $
3    
4  /**  /**
5   * @file   * @file
# Line 983  function theme_fivestar_widget($form) { Line 983  function theme_fivestar_widget($form) {
983  function theme_fivestar_static($rating, $stars = 5, $tag = 'vote') {  function theme_fivestar_static($rating, $stars = 5, $tag = 'vote') {
984    $output = '';    $output = '';
985    $output .= '<div class="fivestar-widget-static fivestar-widget-static-'. $tag .' fivestar-widget-static-'. $stars .' clear-block">';    $output .= '<div class="fivestar-widget-static fivestar-widget-static-'. $tag .' fivestar-widget-static-'. $stars .' clear-block">';
986      if (empty($stars)) {
987        $stars = 5;
988      }
989    $numeric_rating = $rating/(100/$stars);    $numeric_rating = $rating/(100/$stars);
990    for ($n=1; $n <= $stars; $n++) {    for ($n=1; $n <= $stars; $n++) {
991      $star_value = ceil((100/$stars) * $n);      $star_value = ceil((100/$stars) * $n);

Legend:
Removed from v.1.29  
changed lines
  Added in v.1.30

  ViewVC Help
Powered by ViewVC 1.1.2