Support Forums

Rating Module v1.7.1 Modification

This is a discussion on Rating Module v1.7.1 Modification within the Modules / Plugins / Modifications forums, part of the Developer Forums category; Hello, Ok, thanks to Larry's advice I was easily able to turn the rating module options from 1 out of ...


Go Back   68 Classifieds Forums > Developer Forums > Modules / Plugins / Modifications

Reply
 
Thread Tools Display Modes
Old 09-08-2009, 08:27 AM   #1
Junior Member
 
Join Date: Mar 2009
Posts: 25
Rep Power: 11
Kyan is on a distinguished road
Default Rating Module v1.7.1 Modification

Hello,

Ok, thanks to Larry's advice I was easily able to turn the rating module options from 1 out of 5 to 1 out of 2, or rather what I was looking for, Yes or No. However, I'm struggling with the end result. In viewlistings what is displayed is as follows (after 5 mock reviews):

Total Reviews = 5
Average Rating = 3.4 out of 5 stars

I would like this to be limited to two options, Yes or No. So the end result within Viewlistings would look like:

Totals Reviews = 5
Average Rating = 3 answered Yes, 2 answered No

or

Total Reviews = 5
Average Rating = The average person answered Yes (just displaying the highest rating)

Basically, I would like to disable options 3 through 5 and give options 1 and 2 the same value, 1. In doing this I'm hoping the rating module will simply add all the 1's vs all the 2's and output their totals. Is this possible? Anyone have any ideas? Hope this makes sense.
__________________
Thanks,

v4.2.1 - Developer
Kyan is offline   Reply With Quote
Old 09-08-2009, 08:59 AM   #2
curmudgeon
 
Join Date: Mar 2006
Posts: 5,413
Rep Power: 138
Lhotch is a glorious beacon of light Lhotch is a glorious beacon of light Lhotch is a glorious beacon of light
Default

This is going to take some work and I dont have a turn key solution to give you, but the way the mod works right now is it "sums" (ie adds up) the ratings and does some math to display an average.

You are going to need to alter the database queries in hooks.php for the rating mod. What you are probably going to have to do is 2 queries in place on the existing single query, one to get yes anwers and one to get no answers. Then stor and display accordingly.

This will likely not be an easy task if you dont have some php experience.
__________________
Larry

Knowledge learned is more valuable than knowledge given.
Lhotch is offline   Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Module - Rating Mod Eric Barnes Modules / Plugins / Modifications 7 08-26-2008 08:31 AM
Seller Rating Modification Jake Pre Sales Questions 2 10-25-2006 11:14 AM


All times are GMT -4. The time now is 03:34 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2011, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0