votings($params['id'], $params['type']);
$smiles = ($prefs['rating_smileys'] == 'y' ? $ratinglib->get_options_smiles($params['type'], $params['id'], true) : null);
$tableBody = "";
if ($prefs['rating_results_detailed'] == 'y') {
foreach ($votings as $vote => $voting) {
if ($prefs['rating_results_detailed_percent'] == 'y') {
$extra_info = '/' . $voting['percent'] . '%)';
} else {
$extra_info = ')';
}
$tableBody .= '
' .
($prefs['rating_smileys'] == 'y' ? '  ' : ' ' . $vote . ' ') .
'(' . $voting['votes'] . $extra_info .
($prefs['rating_smileys'] == 'y' ? ' ' : '') .
'
| ';
}
} elseif ($votings) {
// $smarty->loadPlugin('function_rating_result_avg'); apparently "plugin function_rating_result_avg is not a valid name format"
include_once('lib/smarty_tiki/function.rating_result_avg.php');
return smarty_function_rating_result_avg($params, $smarty);
}
return "";
}