Jump to content

Possibilities with review_form_rating_options


rsangion

Recommended Posts

Hi

I'm not sure if I should post this here on General Discussion or as a question on tips & tricks, so sorry in advance if I'm not on the right place, since I know that custom code is out of support.

On my site, www.brejas.com.br, I use a rating scale of 5 but I added a customization to change each criteria to have a different scale.

Criteria 1 = 10
Criteria 2 = 5
Criteria 3 = 20
Criteria 4 = 5
Criteria 5 = 10

Therefore I have to change what I show to users in terms of rating options for each criteria, multiplying by 2, 1, 4, 1 and 2 and when saving I have to divide by 2, 1, 4, 1 and 2 again to make it compatible with the scale of 5 configured in JReviews backend. In fact I use the weight parameters that exist on the JReviews configuration to be able to set these custom scales, so I multiply or divide by (weight/scale)

The files that I have to change in order for this to work are:

helpers/rating.php (where I multiply the ratings on fuunction detailedRatings)
helpers/review_helper.php (where I multiply the ratings)
controllers/reviews_controller.php (where I divide the ratings)

Does anybody know if with this new filter introduced in Jreviews 3.5.02,  review_form_rating_options, I could have a filter that would allow me to have the same effect, but centralizing the custom code in just one place through this filter?

My doubts are:
1) Can I increase the number of options using the filter?
2) Can I have different number of options for different criterias?
3) Will this filter allow to also change the value of the rating and not only the text displayed?

Thanks!

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...