Hello,

I would like to put the fivestar rating in my page.tpl.php.

Which code would work for that in page.tpl.php?

Thank you in advance!

Regards.Florian

Comments

quicksketch’s picture

Assuming there is a particular node you want to vote on:

print fivestar_widget_form($node);

Note that you have to include a node of some sort for Fivestar to work. Currently Fivestar cannot vote on elements other than nodes.

don@robertson.net.nz’s picture

Greetings - nice module.

I'd like to have the rating on the teaser, but not allow the user to vote until they have read the entire content.

Is this possible?

DOn

memenode’s picture

That's what I'd like too, only static widget, not one for voting.

quicksketch’s picture

Don Robertson, in the settings for the content type, use a "static" widget on the teaser and a "clickable" widget on the full node version.

Alternatively, if you're manually placing the widgets in your tpl.php files, you can use:

print fivestar_static('node', $nid);
quicksketch’s picture

Status: Active » Closed (fixed)
paradigmshifter’s picture

<?php
print fivestar_widget_form($node);
?>

When I do this I get a basic drop down menu form. How can I get the ajax 5 star widget to show instead? Is it supposed to show?

Thanks

paradigmshifter’s picture

Status: Closed (fixed) » Active
paradigmshifter’s picture

Status: Active » Closed (fixed)

Got it... Since I was adding it directly to the template I forgot to add the fivestar.js and fivestar.css, small.css (widget)