I have created content that is user definable using exposed views filters. It works great and allows for a real drill down of shown content for the user using taxonomy and CCK taxonomy fields.
However I cannot see a feasible way to add Fivestar to the exposed boxes for the user. I want them to be able to add to the filter on highest and lowest node ratings but because the module is using a Handler for votingAPI i can't get that in the exposed filters box for the users, so they can't use it to sort this way.
Anyone any ideas if theres a workaround ?
Also how do i get fivestar to show up as selectable or at least show no votes image in teaser view using views ? I have it where it shows the rating when someone rates within the node (although this isn't selectable) but doesn't show anything in teaser view if no rating was or has yet been applied.
Hoping someone can help.
Comments
Comment #1
WISEOZ commentedAdding my support to this request ...
Fivestar needs an Exposed Filter that displays the actual voting selections, "Good", "Bad", "Poor", etc. The Exposed Filter feature for "VotingAPI percent vote result" just isn't user friendly.
Comment #2
ajaysolutions commentedI'm using Drupal 6 and have just installed the Fivestar module and want to expose it using Views for users to filter content (to show only 4 or 5 star for example).
A quick Google brought up this thread, so I presume as I can't see it available in the Views filter and this is still an open thread, this is an outstanding request.
It would be mighty handy!
Thanks,
Al
Comment #3
quicksketchMoving to feature request.
Comment #4
green monkey commentedThank you considering this, it will be very useful
Will you also consider adding a not rated or "0" to this filter?
5
4
3
2
1
0 <---- this will allow us to find and monitor not rated yet nodes. (but I'm not sure sure if you actually store a zero --- it's probably "blank" ?
thanks
Comment #5
cybershan commentedSubscribe, waiting for this new feature.
Comment #6
daneyuleb commentedSubscribe
Comment #7
navs commentedsubscribing
Comment #8
Ghostthinker commentedSubscribe
Comment #9
El Bandito commentedSubscribe.
Cheers
Comment #10
mdowsett commentedsubscribe
Comment #11
nbourdial commentedsubscribe ! I need this feature too.
Comment #12
FuXXz commentedsubscribe
Comment #13
Anonymous (not verified) commentedme too
Comment #14
dreipunktnull commentedsubscribe
Comment #15
ltwinner commentedThis is exactly what I'm looking for. Would an excellent addition to the module.
Comment #16
merilainen commented+1 for this feature
Comment #17
igorik commentedsubscribe
Comment #18
Anonymous (not verified) commentedTwo years and no solution or am I looking in the wrong place?!
Comment #19
guygg commentedYes, this would be mighty nice to be able to do.
Comment #20
nicktech commentedSubscribing
Comment #21
sahuni commentedIt's not possible, even for fivestar cck field?
Comment #22
glitz commentedsubscribing
Comment #23
lsdoc77 commentedSubscribing
Comment #24
Docc commentedsubscribe
Comment #25
mngm commentedSubscribing! Really need this!
Comment #26
sreher commentedsubscribe
Comment #27
YK85 commented+1 subscribing
Comment #28
jbenfield commentedme 2. This would be fantastic and would provide what seems now to be a fairly common website functionality.
Comment #29
Annie Rothenberg commentedsubscribe
Comment #30
patrickroma commentedsubscribe
Comment #31
glenshewchuck commentedsubscribe
Comment #32
BeaPower commentedany progress?
Comment #33
marcoka commentedsubscribe
Comment #34
BeaPower commentednews?
Comment #35
j.helmer commentedSubscribing!
Been almost 3 years since this post was initially brought up. I am quite surprised more people don't need this!
It seems that in this day-and-age, people would have more clients asking for rating systems, and would like to use views filters.
In any event, what is the level of effort to get better views integration for fivestar? I need it for a client.
Comment #36
VictorMYeste commentedI don't know if this can be helpful to someone, but I recently discovered that the REAL vote is rated in 0-100.
So, for example, if you want to exposed a "greather than or equal" (Min) and a "less than or equal" (Max) values of Fivestar and you want to show nodes rated with seven stars, put 70 in both and you get it. Or if you want nodes rated between 5 and 8 stars, put 50 at Min and 80 at Max and it's done.
If you explain all of this to the user, you can have an exposed filter for fivestar. It's not the perfect solution, but... it's the best i have obtained.
Comment #37
jerry commentedFor folks still looking for a solution to this, a study of the Views issue queue yielded this one. It uses the form alter hook to modify the exposed filter form to employ a select list, providing a way to supply the percentage values with more user-friendly labels.
Comment #38
Toxid commentedThat's a very good solution, jerry. I just got one problem, if I remove the query information from the url (the &value=0 information), then the view will not load and gives me this error "An illegal choice has been detected. Please contact the site administrator.". I got no idea how to solve that, even after reading alot in the views issues queue. It seems that the default value for the select list is not set in $form_state. It could be the culprit.
Comment #39
jerry commentedThat problem was reported here in the Views issue; the solution follows in the next response.
My own version looks like this:
Comment #40
Toxid commentedThanks jerry! Although the thread you linked to didn't help me much, your code did. The only difference in my code was that I had set the default value to 0, figured that everything equal to or above 0 could represent the - Any - value. When I changed this value to '' then everything works without problems :-)
Comment #41
BeaPower commentedWhere do I put this code?
Comment #43
jerry commentedWhere do I put this code?
The code is an implementation of a Drupal hook, so it needs to go into a module. It's very simple to create and install such a module - you essentially drop the code into a file called your-custom-module-name.module, and create a matching your-custom-module-name.info file with a few lines of descriptive text. The process is described here for Drupal 6, and here for Drupal 7. If you're not comfortable with doing this yourself, you may be able to use the Module Builder module to help guide you.
Comment #44
ayesh commentedMay be nobody is looking for such feature but I tried #39 and it worked!
For Drupal 7, change this line:
if ($form_state['view']->exposed_form_id == 'views-exposed-form-school-list-page-2') {to this:
if ($form['#id'] == 'views-exposed-form-school-list-page-2') {Comment #45
ugers commentedIf you're looking for a way your users can sort the content by rating, you can add rating in the sort criteria and then expose it. It will appear in the exposed filter widget area and there the users can sort either ascending or descending (can be renamed to e.g. most popular)
Comment #46
stewart.adam commentedPeople looking for this functionality should apply the patch from #1255160: Add better views filters for star ratings, works out of the box!
Comment #47
whiteph commentedSorry, Drupal 6 is end of life, and is no longer supported.