This looks promising but I can’t get it to work. I have encountered the following problems:
(1) On the publish page, once I have entered one or more stars in the stars field, I can’t clear the field. There is always a minimum of 1 star.
(2) I don’t see any way to control whether stars are red or yellow. (They always show up as red.)
(3) No matter how many stars I specify when I set up a particular field, the page on which the rating is displayed always shows outlines of 7 stars. So instead of the rating appearing as 3 out of 5 stars (for example), it looks like 3 out of 7.
I think I have set this up correctly, but I may have missed something. I just used the default HTML and CSS, except I entered my own custom field name and path to the images. Is there anything else I need to change?
Sorry, I don’t read carefully in first time: 1. I will add this in next build. 2. You want that result in yellow stars? For this you to edit rating-stars.png or change style settings
.star-rating li.current-rating{
background: url(../images/rating-stars.png) left center;
...
}
(for CP or SAEF in mx_stars_field/styles/ui.stars.css)
.star-rating li a:hover{
background: url(../images/rating-stars.png) left bottom;
...
}
.star-rating li.current-rating{
background: url(../images/rating-stars.png) left center;
...
}
I hope that’s help.
Thank you, Max. I now have a better understanding of how this is put together.
(1) Yes, I think the ability to remove all stars from an entry would be helpful.
(2) I successfully edited the image to use a custom color consistent with the website and it looks great. I’m not quite sure, though, how this ties in to the “field view” illustration on your website, which shows rows of both yellow and red stars. This led me to think that there was a choice of display colors. I understand now that yellow is just the CP hover state. But you may want to clarify that in your documentation.
(3) I see now that the ul width controls the number of “phantom” stars that appear. It would probably be helpful to others if you explain that in your documentation.
Thank you for your prompt and helpful responses. This extension is exactly what I needed for a current project.
{I will let you know if I encounter any display problems in non-Firefox browsers.)
Brian
Just a heads up, I tried updating jQuery UI for the control panel up to version 1.81 from 1.71 and the MX Stars field collapsed on me. I didn’t have time to work it out, as I don’t especially need the latest version of UI, but I thought I’d let others know.
Thanks for the great fieldtype, Max!
Or I guess a better question to ask is would it be possible to create something that allowed ratings on a row by row basis in the matrix field.
This would help with something I am working on. It is a site where users can submit up multiple portfolios of images. Each portfolio would be a single weblog entry with a matrix field. The matrix would have fields for a title, description, image and rating. The idea of the rating would be that people could rate each image of the portfolio and an averaged rating would be displayed for each image.
Alternatively, there might just be a “Like” button for each image that a user could press and a total # of likes could be displayed.
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.