I'm using contemplate to create a custom node layout.
How do I display the fivestar widget?
All I could find here is this:
<?php
$current_rating = votingapi_get_voting_result('node', $nid, 'percent', 'vote', 'average');
print theme('fivestar_static', $current_rating->value);
?>
But I don't want a 'static' display, I want the 'full' display.
What function should I use?
Comments
Comment #1
quicksketchshould do the job.
Comment #2
quicksketchComment #3
ofridagan commentedThanks!
But... fivestar_form() take two parameters, and returns an array.
Can you please explain how to use it?
I tried to use:
But it only shows text - no stars.
Comment #4
jeffrey.dalton commentedI have a similar question: I am theming the whole custom CCK type with node-custom_type.tpl.php and using 5 star with anonymous voting setting for this content type. Wondering how to call the 5 star widgets various configurations into the node-custom_type.tpl.php file?
I normally call custom fields as:
I am not using 5 star as a custom field so trying to figure out how to call it as a rendered widget?
Is there a way to do this for 5 star?
Peace,
Jeffrey
Comment #5
chadchandler commentedI think what QuickSketch forgot the widget part. Try this ...
Comment #6
mmerlange commentedHi,
Thank you for your tip.
I have 3 different cck using fivestar, how can I distinguish one form an other? I wish I had the 3 widgets displayed in differents parts of my template.
Thank you,
Michael