Fivestar rating problem
chris33 - June 3, 2008 - 13:21
| Project: | Fivestar |
| Version: | 5.x-1.9 |
| Component: | Code |
| Category: | support request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Jump to:
Description
I have this scenario:
I am installing Ubercart, then I enabled the fivestar rating on the product content type. Everytime I create a content it assigned the rating already. Some of my content in product content type don't really need rating. Can I configure this one. Please help. Or guide me to the fastest way.. Thanks..

#1
Sounds like when you configured the site wide settings for Fivestar you might have set a default value for the widget.
If some items do not need to be rated you could also hide the widget by using a CCK field and some custom php
Something like this maybe:
In your node.tpl or node-custom.tpl
<?php
if ($field_widget[0]['value'] == "true")
{
print fivestar_widget_form($node);
}
?>
The syntax may be bad its only theory craft, corrections are welcome ofcourse :)
Where $field_widget would be a CCK field is a radio button or or drop down with the values of true and false. In your site wide settings you would want to hide the widget on the nodes themselves.
This will only affect the display of the widget in the node itself. I do not know of a way to selectively hide the widget on the comment form. So even with this code in place the comments will still offer a widget unless you disable the widget in comments OR disable comments on the particular nodes you dont want rated.
#2
Closing after lack of activity.