It’s possible I missed a response to this, but my eyes are blurry after bashing my head against a brick wall on this.
This is all on a dev machine, so I can’t give links to it, in case anyone able to help asks, but here goes anyway…
I’ve set up my fields - review, rating1, rating2 rating3, rating4. Ultimately, rating 1 will equate to something like service, rating 2 will equate to cleanliness and so on. The post will be about a ‘customer exper, and ers will have the opportunity to give a review of their experience of that outlet, and rate it according to those criteria. So far so good - form collects reviews and ratings, and I can get them to display against the post as numerical values, so I know all of that is working. But then I hit a problem when I try and make it pretty…
Suffice to say I am bemused. I’ve poked around the module, extension and language files and decided to leave well alone lest I wreak complete havoc, so any help would be much appreciated.
Aside from this issue - I’d like to congratulate all at Solspace on this module - it totally rocks!
Andy, further to my reply from support@, let’s see if I can help you here…
Andy White - 26 June 2007 08:42 AM
I’ve set up my fields - review, rating1, rating2 rating3, rating4. Ultimately, rating 1 will equate to something like service, rating 2 will equate to cleanliness and so on. The post will be about a ‘customer exper, and ers will have the opportunity to give a review of their experience of that outlet, and rate it according to those criteria. So far so good - form collects reviews and ratings, and I can get them to display against the post as numerical values, so I know all of that is working. But then I hit a problem when I try and make it pretty…
Ok, so the initial setup works. That’s good. What are you using to display the numerical values?
But, and here’s the odd thing - or even odder thing, at least to me
Actually, that’s not so odd. I believe we are talking about an, ahem, shortcoming of the Rating Module here. It was not meant to display more than one value, and thus display the behavior you experienced. (See below)
I’ve poked around the module, extension and language files and decided to leave well alone lest I wreak complete havoc, so any help would be much appreciated.
There may be workarounds for your issue, but from what I see, you are not doing anything fundamentally wrong.
By the way, Andy, I made the necessary feature request for you. To be clear, these are somewhat special circumstances, you are intending to use the rating module in a way that it was not meant to. (Which is cool, don’t get me wrong.)
Now, it might or might not be easy to adapt that to your needs. I am somewhat surprised, actually, that the simple display of average values works as it appears to do. As a short term fix, we might be able to work with that. Could you please post a typical sample output, in HTML code?
Ok, so the initial setup works. That’s good. What are you using to display the numerical values?
I’m just using my custum ratings field - currently just named {rating1}, {rating2} etc. I’m experimenting so I’ll get to more cunning field names in due course
Actually, that’s not so odd. I believe we are talking about an, ahem, shortcoming of the Rating Module here. It was not meant to display more than one value, and thus display the behavior you experienced.
Eeek! That would be a real downer if that can’t work - I reckon that that would be a heavily used feature - I know by me it would, at least.
As a short term fix, we might be able to work with that. Could you please post a typical sample output, in HTML code?
That would be great - I’ll take any help that’s going to fix this - my own fault - I just assumed the ratings module would do this - note to self: check first! HTML code below - ignore the odd div names, I am just slotting it into a standard entry page to see it work (or not, as the case currently is )
<div class="cS2">
<div class="commentHeader"> <!-- general info for comment area --> <h2>What others had to say about Brittany Ferries</h2> </div> <!-- end div class "commentHeader" -->
Actually, you said you were getting numeric values for all ratings, I’d like to see those. Also, I’m not saying it wouldn’t be an interesting feature, but currently the module is meant to rate _one_ article, as is, not give your rating on multiple questions.
Sorry, I probably didn’t explain what I was getting/doing very well. I’ll try and expand a little.
Basically, I have 4 ratings, which I now know to be beyond the module, as currently is. In my template I wanted the results to show as 4 ‘star’ ratings, so I wrapped each individual custom filed in the {stars} tag. What I got was the first rating displayed as stars, and then the next three as numbers. So I thought I’d play around. I tried it again replacing {stars} with {circles} and then with {bar} - same result each time - first rating represented graphically, what followed was a number, and tag - ie {circles}1{/circles} was actually what was rendered on the screen, not just the figure 1.
So then I played some more and tried wrapping the first in {stars}, the next in {circles} and the next in {bar}; for the last rating I went back to {stars}. This time I got graphical for the first three - stars, circles and a bar, and for the fourth I still got a number and the tags - ie {stars}4{/stars} displayed on the screen.
Then, if I take the {stars} etc out altogether and just have, say Rating 1: {rating1} I get Rating 1: 3, for example.
It seems the module is really happy to display multiple ratings per review - I haven’t tried it as an average yet - and to display a graphical representation once only. The fact it will show them and represent them graphically (each style once only) suggests to my novice brain that someone who understands the black art of php better than me could probably get it so that it will display, say {stars}, more than once; but I say that as one who doesn’t understand more than very basic php, so I could be way off.
As for pulling multiple ratings from multiple reviews on a single post and averaging them for overall ‘post’ ratings in each ratings category, I haven’t got that far yet. But, if that won’t work, then I guess there would be little merit in fixing the graphical display of multiple ratings per review.
My guess is that you’ll be no clearer after that ‘explanation’, but hopefully I’ve done a little better at saying what I was trying to do.
Again, Ingmar, thanks so much for looking at this for me.
In my template I wanted the results to show as 4 ‘star’ ratings, so I wrapped each individual custom filed in the {stars} tag. What I got was the first rating displayed as stars, and then the next three as numbers.
Yes, I got that so far.
Then, if I take the {stars} etc out altogether and just have, say Rating 1: {rating1} I get Rating 1: 3, for example.
Right. That “3” interests me, what is it, cumulative rating? An integer?
It seems the module is really happy to display multiple ratings per review - I haven’t tried it as an average yet - and to display a graphical representation once only.
That’s the way I see it, too.
The fact it will show them and represent them graphically (each style once only) suggests to my novice brain that someone who understands the black art of php better than me could probably get it so that it will display, say {stars}, more than once;
Yes. That is what the FR is for. But we’re looking for a short-term fix
As for pulling multiple ratings from multiple reviews on a single post and averaging them for overall ‘post’ ratings in each ratings category, I haven’t got that far yet. But, if that won’t work, then I guess there would be little merit in fixing the graphical display of multiple ratings per review.
I agree, so you might want to try that. My thought for a short term fix was to take the valuec (say, “4”) and display a custom image “4.gif” for 4 stars, and so on. Might take a bit of PHP to round it to the nearest integer, but could work. It’s all I can think of right now, at any rate.
Thanks Ingmar, sorry to give you a bit of a work-out on this one.
The ‘3’ is the rating that a particular reviewer gave something. Basically, it’s set up so a post can be reviewed and rated (obviously) and each ‘review’ is displayed on the post, together with the specific ratings that reviewer ascribed to each rating category. So the ‘3’ is the value that the reveiwer gave for that category. If that were the first one in my list, it would show up as, say, starts - 3 of them - but if it were the second, it would simply display as the figure 3. Don’t know if that clarifies or not.
I can probably sell it to teh site owner that we’ll kick off with one rating category for now - say an ‘overall’ experience and then when the FR comes in to play in teh module we can expand the capabilities of that section for his site. I’ll spell out in more detail what I’m ultimately hoping to achieve and attach that to teh FR you raised.
I don’t unerstand enough about php etc to try the fix you suggested - it’s one of teh reasons I went for EE in the first place, actually - I just didn’t fancy learning php - I guess I’ll need to at some point, but I’m still on a vertical learning curve with the fundamentals of the deeper secrets of EE, so I don’t want to bite off more than I can chew If you come up with something that will work as a fix I’d love to give it a try, but I’m conscious of not taking up too much of your time, too.
Thanks again for all your help so far - I really appreciate it. I’ll try the averaging of a number of reviews tomorrow and I’ll post up what happens.
It is possible, for advanced users, to create rating systems with multiple rating criteria. For example, you can use the module to create a rating system for restaurants where you collect ratings on a scale of 1 to 5 for quality of food, service, ambience, price, location, &c. All of these fields can be totaled and averaged separately as well as totaled and averaged cumulatively.
Additionally, the module can be used to collect different rating sets. You may have a travel website with a list of hotels. A hotel might have one rating form for its food and restaurants, then a different rating form for it’s resort facilities and yet another form for its casino amenities. All of these different vectors can be captured by separating the ratings and reviews into different forms. Each rating form is differentiated separately in the database and has statistics collected specific to it.
I am more baffled than ever. Will take this up with Mitchell.
LOL!! Sorry Ingmar - I shoudl have left well alone
That was what I thought it could do, but I assumed I must have got it wrong, so knowing that it will do it is great news! Knowing how to do it, of course, is a whole other story
I look forward to finding out the nuts and bolts in due course.
Thanks again for all your help on this, it really is very much appreciated.
You and Ingmar are correct. The rating module is intended to allow you to collect ratings across multiple vectors for a given blog entry. If you are collecting and displaying only integers and not decimal values you could use the faster / better performance approach of adding the rating value to the name of an image. This cuts down on the parsing required to handle the various variable pairs.
I trust you had a good time away, and congratulations!
Thanks for that - I haven’t tried it, but I will do so tomorrow, and I’ll feed back the outcome - I’m off to catch a few zzzz’s right now - it’s getting late this side of the pond.
If the suggested method doesn’t work for you I’ll fix the module to work in the manner you were expecting and have a new version for you early next week.
Xlent, thanks Mitchell. I’m tempted to try it now, but I daren’t! I’ll try it in the morning and let you know the outcome. Top marks for customer support, as ever - very impressive - and, as ever, the assistance of you and your team is much appreciated
Thanks for the suggestion, which I’ve tried but to no avail. In fact, using that construct everything disappeared - no data displayed at all between the {stars} tags. Here’s what code I had…