Five star rating(hodnotenie 5 hviezdickove) - ako umiestnit kdekolvek na stranke
Vložil/a joujou, 9 Červen, 2012 - 13:50
Kategorie:
PHP chyby
Týká se verze:
Drupal 6.x
Potreboval by som umiestnit na stranke 5 hviezdickove hodnotenie. Stiahol som si modul Five star rating, ale ten umoznuje umiestnit hodnotenie do bloku, chcel by som umiestnit hodnotenie kdekolvek do obsahu. Trochu som googlil a nasiel som nejaky navod http://drupal.org/node/486120 nizsie uvedeny kod je treba nakopirovat do node.tpl.php:
<em><?php if (user_access(‚rate content‘) && variable_get(‚fivestar_‘. $node->type, FALSE)) {
$fivestar_widget = fivestar_widget_form($node);
} else {
$current_rating = _votingapi_get_standard_results(‚node‘, $nid);
echo $current_rating[vote][percent][average];
$fivestar_widget = theme_fivestar_static($current_rating[vote][percent][average]);
}
$content = str_replace(‚[STARRATINGBLOCK]‘, $fivestar_widget, $content); ?></em>
do obsahu mam vlozit:
<em>"[STARRATINGBLOCK]"<div class="content clear-block">
<?php print $content ?>
</div></em>
Nefunguje to neviete poradit preco?
Poslat nový komentář