|
|
|
|
@ -1319,23 +1319,28 @@ class Display { |
|
|
|
|
if (!empty($percentage)) { |
|
|
|
|
$percentage = $percentage*125/100; |
|
|
|
|
} |
|
|
|
|
$accesses = isset($point_info['accesses']) ? $point_info['accesses'] : null; |
|
|
|
|
$accesses = isset($point_info['accesses']) ? $point_info['accesses'] : 0; |
|
|
|
|
|
|
|
|
|
$star_label = sprintf(get_lang('XStarsOutOf5'), $point_info['point_average_star']); |
|
|
|
|
|
|
|
|
|
$html = '<ul id = "'.$id.'" class="star-rating"> |
|
|
|
|
<li class="current-rating" style="width:'.$percentage.'px;"></li> |
|
|
|
|
<li><a href="javascript:void(0)" rel="'.$url.'&star=1" title="'.get_lang('OneStarOutOf5').'" class="one-star">1</a></li> |
|
|
|
|
<li><a href="javascript:void(0)" rel="'.$url.'&star=2" title="'.get_lang('TwoStarsOutOf5').'" class="two-stars">2</a></li> |
|
|
|
|
<li><a href="javascript:void(0)" rel="'.$url.'&star=3" title="'.get_lang('ThreeStarsOutOf5').'" class="three-stars">3</a></li> |
|
|
|
|
<li><a href="javascript:void(0)" rel="'.$url.'&star=4" title="'.get_lang('FourStarsOutOf5').'" class="four-stars">4</a></li> |
|
|
|
|
<li><a href="javascript:void(0)" rel="'.$url.'&star=5" title="'.get_lang('FiveStarsOutOf5').'" class="five-stars">5</a></li> |
|
|
|
|
<li><a href="javascript:void(0)" rel="'.$url.'&star=1" title="'.$star_label.'" class="one-star">1</a></li> |
|
|
|
|
<li><a href="javascript:void(0)" rel="'.$url.'&star=2" title="'.$star_label.'" class="two-stars">2</a></li> |
|
|
|
|
<li><a href="javascript:void(0)" rel="'.$url.'&star=3" title="'.$star_label.'" class="three-stars">3</a></li> |
|
|
|
|
<li><a href="javascript:void(0)" rel="'.$url.'&star=4" title="'.$star_label.'" class="four-stars">4</a></li> |
|
|
|
|
<li><a href="javascript:void(0)" rel="'.$url.'&star=5" title="'.$star_label.'" class="five-stars">5</a></li> |
|
|
|
|
</ul>'; |
|
|
|
|
|
|
|
|
|
$labels = array(); |
|
|
|
|
|
|
|
|
|
$labels[]= $number_of_users_who_voted == 1 ? $number_of_users_who_voted.' '.get_lang('Vote') : $number_of_users_who_voted.' '.get_lang('Votes'); |
|
|
|
|
$labels[]= $accesses == 1 ? $accesses.' '.get_lang('Visit') : $accesses.' '.get_lang('Visits'); |
|
|
|
|
$labels[]= $point_info['point_average_star'].' '.get_lang('Average'); |
|
|
|
|
$labels[]= $point_info['user_vote'] ? get_lang('YouAlreadyVoted').' '.$point_info['user_vote'] : ''; |
|
|
|
|
if (!empty($number_of_users_who_voted)) { |
|
|
|
|
$labels[]= get_lang('Average').' '.$point_info['point_average_star'].'/5'; |
|
|
|
|
} |
|
|
|
|
//$labels[]= $point_info['user_vote'] ? Display::return_icon('good.png', get_lang('YourVote'), array(), 22).' ['.$point_info['user_vote'].']' : ''; |
|
|
|
|
$labels[]= $point_info['user_vote'] ? get_lang('YourVote').' ['.$point_info['user_vote'].']' : ''; |
|
|
|
|
|
|
|
|
|
if (!$add_div_wrapper && api_is_anonymous()) { |
|
|
|
|
$labels[]= get_lang('LoginToVote'); |
|
|
|
|
@ -1350,4 +1355,4 @@ class Display { |
|
|
|
|
return $html; |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
} //end class Display |
|
|
|
|
} //end class Display |