Needs work
Project:
Fivestar
Version:
7.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
4 Aug 2009 at 07:27 UTC
Updated:
5 Oct 2014 at 16:31 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
pforestsd commentedI am having this exact same issue. If anyone has any suggestions it would be greatly appreciated.
Comment #2
smartparty commentedDitto. Subscribing.
Comment #3
hexblot commentedHad the same problem, here's a fix :
find the file fivestar.module, and find the function theme_fivestar_static (around ln 1396 in my case )
The first line should be :
Add the line
right under it. You should now have something like :
CCK will recognise the output as empty, and not show the field.
I'm not submitting a patch since this would require an admin checkbox to figure out whether this is a desired behavior, plus I'm not sure if this approach differentiates 0 as in "no rating" and 0 as in "score of 0".
However, in most cases you have a minimum rating anyway ( our reviews always have a typical minimum of 1 ), so it might help some people.
Enjoy :)
Comment #4
bnicoll commentedPerfect worked well for me.
Thanks again.
Ben.
Comment #5
jasom commentedNice @hexblot, worked for me, good job.
Comment #6
imk commentedI'm having the same problem but am using Drupal 7.
I have implemented the fivestar rating into the comments.
I have two user roles, A and B, and A is not allowed to use fivestar to rate. I used the Field Permissions module to hide the fivestar field for role A. However, when they submit their comments, the fivestars appear empty.
I am relatively new to Drupal and would appreciate any help.
- imk
Comment #7
imk commentedAnyone have a D7 solution for this?
Comment #8
imk commentedAnyone?
Comment #9
BeaPower commentedsame here, d7
Comment #10
Casper_Deseyne commentedfor D7 a temporary solution is to find fivestar.field.inc and add the following code at line 467:
Comment #11
marcelovaniI have created a patch that adds an extra option (see screenshot)
Comment #12
marcelovaniI am also using this patch http://drupal.org/node/1506582#comment-6677268
So, for anyone that want to use the patch above I create another patch for the current issue, merged with it
Comment #13
marcelovaniI am also using this patch http://drupal.org/node/1514826#comment-5866494
So, for anyone using http://drupal.org/node/1506582#comment-6677268 and http://drupal.org/node/1514826#comment-5866494 on the top of the current issue, here is a merge of the 3.
Comment #15
marcelovaniChanging the version to test the patch for D7
Comment #16
marcelovani#13: merge-539444-1514826-539444-13.patch queued for re-testing.
Comment #18
skruf commentedUpdated patch #13 to fix bug where values were rendered as percentage on form validation fail. Also fixed bug that allowed user to add higher value than 'stars' setting.
Comment #19
rainman-2 commentedFor Drupal 7, I copied the theming function, theme_fivestar_static($variables) from sites/all/modules/fivestar/includes/fivestar.theme.inc into my template.php file. As always, I renamed the function to have my theme's name in place of 'theme'. Of course, clear your cache too.
All I did was add a conditional around the output that checked if there were any ratings first.
Comment #20
GrahamO commentedThank you rainman. #19 is just what I needed.
Comment #21
kopeboyFirst patch 3 years ago, can we include a working patch please?
In my case it would be enough just to put a CSS class around the item that has no vote..