We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

New Field: MX Stars Field (EE1 / EE2)

Development and Programming

Max Lazar's avatar
Max Lazar
337 posts
16 years ago
Max Lazar's avatar Max Lazar

Simple field type for FF. It gives you the input field designed as stars rating. Add colors to your publish page 😊

download

       
wecreateyou's avatar
wecreateyou
86 posts
about 16 years ago
wecreateyou's avatar wecreateyou

This is really neat Max, thanks for sharing. I’ll give it a try.

       
artminister's avatar
artminister
159 posts
about 16 years ago
artminister's avatar artminister

Hi Max,

Does it allow rating of weblog entries or basically how can we use this?

       
xlawdog's avatar
xlawdog
62 posts
15 years ago
xlawdog's avatar xlawdog

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?

       
Max Lazar's avatar
Max Lazar
337 posts
15 years ago
Max Lazar's avatar Max Lazar

is you jQuery ext. on? What browser do you use?

       
xlawdog's avatar
xlawdog
62 posts
15 years ago
xlawdog's avatar xlawdog

Yes, the jQuery CP extension is on. I’m using Firefox 3.5.3 for Mac. My EE version is 1.6.8. Thanks for your help.

       
Max Lazar's avatar
Max Lazar
337 posts
15 years ago
Max Lazar's avatar Max Lazar

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;
...
}
  1. for viewing 10 stars you need to increase UL width:


I hope that’s help.

       
xlawdog's avatar
xlawdog
62 posts
15 years ago
xlawdog's avatar xlawdog

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

       
Max Lazar's avatar
Max Lazar
337 posts
15 years ago
Max Lazar's avatar Max Lazar

Fieldtype was updated + ExpressionEngine 2 version is ready

       
Tom Jaeger's avatar
Tom Jaeger
228 posts
15 years ago
Tom Jaeger's avatar Tom Jaeger

Looks sweet. I should be able to use this on an upcoming project of mine.

Thanks

       
Oxygen Smith's avatar
Oxygen Smith
120 posts
15 years ago
Oxygen Smith's avatar Oxygen Smith

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!

       
Max Lazar's avatar
Max Lazar
337 posts
15 years ago
Max Lazar's avatar Max Lazar

just update it - now you can used Stars field with ue 1.8.1. Thanks for note!

       
*Mark*'s avatar
*Mark*
60 posts
15 years ago
*Mark*'s avatar *Mark*

Hi Max,

Many thanks for this.

Is this rating system just for the publisher to rate or can regular visitors to website rate?

Many thanks, Mark

       
james Brown's avatar
james Brown
492 posts
15 years ago
james Brown's avatar james Brown

I have basically the same question as inspiredMark, can this be used as a voting mechanism? or is it just for the publisher to put in their rating?

       
james Brown's avatar
james Brown
492 posts
15 years ago
james Brown's avatar james Brown

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.

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.