solved Manipulating Ratings

MySong
MySong
@mysong
10 years ago
155 posts
Since it can be easy for a user to manipulating ratings via a series of proxies, trying to find a way to revert such attempts.

Assuming this can be done through the JRrating data browser...

I went to a song that was never rated yet and gave it 4 stars.
Then I went to datastore and found the info for that rating. I changed the rating_value tag from 4 to 3. Went and refreshed Template and Database Caches. On datastore info remains '3' but on front end the item continues to display 4 stars.

Now I went a step further and deleted that entire 'rating_data:' snipt from datastore, reset caches but on front end item continues to display 4 stars.

Any idea?

Thanks
updated by @mysong: 08/14/14 08:42:55PM
douglas
@douglas
10 years ago
2,790 posts
Did you clear your browser cache too?


--

Douglas Hackney
Jamroom Team - Designer/Developer/Support
FAQ-Docs-Help Videos
MySong
MySong
@mysong
10 years ago
155 posts
Yes just double checked, cleared browser cache but rating still showing as 4.

Thank,
douglas
@douglas
10 years ago
2,790 posts
There are two places the ratings get recorded, one in the jrRating module and one in the module for the item that was rated... so if you are trying to change the rating for an audio item, you'll find the ratings in the jrAudio datastore.

Hope this helps,
Douglas


--

Douglas Hackney
Jamroom Team - Designer/Developer/Support
FAQ-Docs-Help Videos
MySong
MySong
@mysong
10 years ago
155 posts
Thanks that should work.

Once we are dealing with ratings one more question...

When songs or items are listed by rating does the amount of votes make a difference. For example if one song was rated 5 stars by 2 votes and another song was rated 5 stars by 20 people. Will the 20 vote 5 star song rise above the first one or does it not make a difference? If it does not make a difference then what determines the order for items/songs that have the same rating?

Thanks
douglas
@douglas
10 years ago
2,790 posts
I do believe it does make a difference, the ratings are calculated by how many votes it has and the star rating of those votes. So yes... a 5 star rating by 20 people should show in the list before a 5 star rating by two people, as long as that is how you have the lists order_by or search parameter setup.

Hope this helps,
Douglas


--

Douglas Hackney
Jamroom Team - Designer/Developer/Support
FAQ-Docs-Help Videos
MySong
MySong
@mysong
10 years ago
155 posts
Using the datastore of JRAudio I manipulated a song to have a 5 star rating with 20 votes, yet in list it is showing in original position under songs that have only one vote. Assuming we would want to manipulate that as well is there a different place where data had to be changed for this has to happen?

Thanks
douglas
@douglas
10 years ago
2,790 posts
Which datastore parameter did you change?

I've not played with changing the amount of votes via the datastore but I would imagine it would be the audio_rating_1_5, you may need to change the overall count to equal the total counts as well.

Also be sure to reset the cache too.

Hope this helps,
Douglas


--

Douglas Hackney
Jamroom Team - Designer/Developer/Support
FAQ-Docs-Help Videos
MySong
MySong
@mysong
10 years ago
155 posts
Refreshed both browser and site cache, still showing in original position.

Here is the data for the song

audio_active: on
audio_album: Green Cans
audio_album_url: green-cans
audio_bundle_only: off
audio_display_order: 7
audio_file_album: Green Cans
audio_file_bitrate: 128
audio_file_date: 2014
audio_file_extension: mp3
audio_file_genre: Other
audio_file_item_bundle: 10
audio_file_item_price: 1.50
audio_file_length: 00:03:32
audio_file_name: jrAudio_72_audio_file.mp3
audio_file_original_bitrate: 256
audio_file_original_extension: mp3
audio_file_original_name: 08 High Land.mp3
audio_file_original_size: 6801392
audio_file_original_time: 06/22/14 02:53:25PM
audio_file_original_type: audio/mpeg
audio_file_sample_length: 106
audio_file_size: 3403185
audio_file_smprate: 44100
audio_file_stream_count: 1
audio_file_time: 06/22/14 02:56:52PM
audio_file_title: High Land
audio_file_track: 8
audio_file_type: audio/mpeg
audio_genre: Other
audio_genre_url: other
audio_image_extension: jpg
audio_image_height: 350
audio_image_name: green-cans.jpg
audio_image_size: 133331
audio_image_time: 06/22/14 02:53:25PM
audio_image_type: image/jpeg
audio_image_width: 350
audio_pending: 0
audio_rating_1_1: 0
audio_rating_1_2: 0
audio_rating_1_3: 0
audio_rating_1_4: 0
audio_rating_1_5: 20
audio_rating_1_average_count: 5
audio_rating_1_count: 20
audio_rating_overall_average_count: 5
audio_rating_overall_count: 20
audio_title: High Land
audio_title_url: high-land
douglas
@douglas
10 years ago
2,790 posts
Are you looking at a music by rating list?

Do you have a link we can check out?

Thanks!


--

Douglas Hackney
Jamroom Team - Designer/Developer/Support
FAQ-Docs-Help Videos
brian
@brian
10 years ago
10,148 posts
To be honest I'm not sure if the ratings take into account the count, although I _think_ they do - I can confirm tomorrow once I am back in the office.

Hope this helps!


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
michael
@michael
10 years ago
7,714 posts
Since your wanting to know what changed in the database when you do add a new rating, I suggest:
* dumping your database to a text file
* add a rating
* dumping your database to a different text file.
* use a difference program to compare the two files.

The difference will be what happened when a rating was done.
MySong
MySong
@mysong
10 years ago
155 posts
Guys I guess I spoke too soon, moving to advance things before testing the basics. Now I see I can not even get multiple natural rankings to work. I tried ranking the same song from a few proxies and even a different location but it just remains as one vote and rating changes according to last rating given.

Will start a ticket so I can send url's. If we find a solution we can add it to this thread to benefit other JR site admins.

Thanks
douglas
@douglas
10 years ago
2,790 posts
douglas:
I do believe it does make a difference, the ratings are calculated by how many votes it has and the star rating of those votes. So yes... a 5 star rating by 20 people should show in the list before a 5 star rating by two people, as long as that is how you have the lists order_by or search parameter setup.

I'm wrong here... it goes by the rating average and doesn't matter how many votes an item has.

Hope this helps,
Douglas


--

Douglas Hackney
Jamroom Team - Designer/Developer/Support
FAQ-Docs-Help Videos
MySong
MySong
@mysong
10 years ago
155 posts
Issue with votes not counting was resolved with JRAudio update 1.1.4
MySong
MySong
@mysong
10 years ago
155 posts
Regarding allowing votes to influence item order...

From @brian

Yeah what you want to do here is just add an extra order_by parameter - you can have as many as you want. So in the jrCore_list call that you want to order by rating, change this:

order_by="audio_rating_total_count numerical_desc"

to

order_by1="audio_rating_overall_average numerical_desc" order_by2="audio_rating_overall_count numerical_desc"

Which will then order by average, and then count.
MySong
MySong
@mysong
10 years ago
155 posts
The new email notifications feature in 1.1.4 sounds great and can help a site keep on top of spam. However do not see this option in settings after update.

Thanks,
MySong
MySong
@mysong
10 years ago
155 posts
Item Ratings module changelog Version 1.1.4:
- New: Rating email notifications added.
brian
@brian
10 years ago
10,148 posts
MySong:
The new email notifications feature in 1.1.4 sounds great and can help a site keep on top of spam. However do not see this option in settings after update.

Thanks,

It does not appear in settings - it will show up in the user's "notifications" section of their account config.

Hope this helps!


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net