Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Where do I change the rating from 5 to 100

Quote Reply
Where do I change the rating from 5 to 100
Greetings again,
I am trying to have a rating mechanisim based on 100 points (along with the chart in the review page) instead of 5;. What files whould I change to accomplish this task as rate is not a global.

Thank you again for your help.
Mark.
Post deleted by Mark2 In reply to

Last edited by:

Mark2: Jun 25, 2002, 9:14 PM
Post deleted by Mark2 In reply to
Post deleted by Mark2 In reply to
Quote Reply
Re: [Mark2] Where do I change the rating from 5 to 100 In reply to
This would take a hell of a lot of modifications...I'm not sure if it would be worth your while. Why would you want to do this??? Unsure

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Where do I change the rating from 5 to 100 In reply to
Well I think I have nerrow it down to "REVIEW_RATING" and I am almost got it. I have changed the rating form and review.pm and rate.pm to reflect 100 instead of 5; however, if I try to re-change my rating (if I am a user), I get a error message (Please select a rating from 1 to 5 only. ) if I select 60 for example. So:

1 - where should I change this checking code (where is REVIEW_RATING defined) to change it from 5 to 100.

2 - Also, I want the user to have as many review as he/she wants (not update their own) how should I go about doing that as well.

Thank you for your help
Mark

Last edited by:

Mark2: Jun 26, 2002, 7:30 AM
Quote Reply
Re: [Mark2] Where do I change the rating from 5 to 100 In reply to
I think I still miss one thing: the number of digits in the review.pm needs to be changed. I DO NOT KNOW HOW, but my new ratings, takes the number "9" but not number "10" or "15". This means it is accepting one digit but not 2 digits.
Does any one know how to change the digit number (maybe it is in review.pm ... like $_ or something...)!!! any idea?

Thank you again...
Quote Reply
Re: [Mark2] Where do I change the rating from 5 to 100 In reply to
I have changed my review ratings to 1 to 10 so that they match up with the ratings - so that at some point in the future I can put an average rating which includes the review ratings.

I'm not sure what you have changed in your review.pm file but there are several places where you need to change the 5 to a 100 for the stats to work and then again further down for the rating to be accepted at:

# Make sure we have a valid rating.

unless (($input->{Review_Rating} =~ /^\d*$/) and ($input->{Review_Rating} >= 1) and ($input->{Review_Rating} <= 100))

If you've done this and it still doesn't work, can you provide more information about the error you're getting.

Laura.
Quote Reply
Re: [afinlr] Where do I change the rating from 5 to 100 In reply to
Hello Laura,
Thank you for your reply.
When I made the change to review.pm, I searched the entire file for the number 5, and replaced it with number 100. I think it was 6 to 10 places I had to replace. Also, I expanded the input form of add_review and edit_review...etc. but I am still getting the same problm.
I am able to rate/review up to number 9 but when it becomes 10, 12, or any two digit numebr I get the error "Please select a rating from 1 to 5 only." This error can be traced to Review_Rating or the GLOBAL REVIEW_RATING or something... however, I am unable to use TWO DIGITS in my review/ratings.
Any idea, and thank you in advance for your help
Regards..
Mark
Quote Reply
Re: [Mark2] Where do I change the rating from 5 to 100 In reply to
Mark,

Its sometime since I did this mod on my site and I can't remember now what I have changed and what was there originally.

Can you go to Database>Reviews>Properties and check that the form regex for Review Rating is ^\d+$

You need the + to allow more than one digit.

Laura.

Edit: You should also change the error message in Build>Language>Reviews so that it says 100 instead of 5.

Last edited by:

afinlr: Jul 1, 2002, 8:25 AM
Quote Reply
Re: [afinlr] Where do I change the rating from 5 to 100 In reply to
Hello Laura,
I checked both the LINKS properties and it has ^\d+\.?\d*$ (I have no idea what that means).
also the REVIEWS properties has ^\d+$
so I have no idea where is the check is happining for one digit... maybe $_ in review.pm (I am not familiar with PERL at all... I do not even know if I spelled it correctly). I've changed even the stars-5.gif and stars-5-5.gif to reflect all the way to 100 ... hummmm lots of work, I hope not wasted.

Best regard and thanks for your help again.
Mark
Quote Reply
Re: [Mark2] Where do I change the rating from 5 to 100 In reply to
OK - next guess:

Have a look in review.pm and check the line that I pointed out before:

unless (($input->{Review_Rating} =~ /^\d*$/) and ($input->{Review_Rating} >= 1) and ($input->{Review_Rating} <= 100))

Do you have the star? Actually would be better as a + I think but I'm guessing you don't have either?

If this isn't it, I'm beginning to run out of ideas!

Laura.
The UK High Street

Last edited by:

afinlr: Jul 1, 2002, 2:15 PM
Quote Reply
Re: [afinlr] Where do I change the rating from 5 to 100 In reply to
THANKS A LOT LAURA Wink it worked beautifully!

That was the exactly the reason. I added * in the review.pm as you suggested! and it works!!

thank you very much

Mark
Quote Reply
Re: [Mark2] Where do I change the rating from 5 to 100 In reply to
You'll probably want a + rather than * as Laura said. Or {1,3} to be a bit stricter.

Last edited by:

Paul: Jul 2, 2002, 2:54 AM