Project

General

Profile

Actions

Feature proposal #4221

closed

Rewrite rating field and implement as core fieldtype

Feature proposal #4221: Rewrite rating field and implement as core fieldtype

Added by krileon over 12 years ago. Updated about 11 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
Start date:
04 September 2013
Due date:
% Done:

100%

Estimated time:

Description

Redo the rating field entirely then implement as a core type.

Updated by krileon over 12 years ago Actions #1

Use "yourratings" and "myratings" to avoid conflict, same method used for video/file fieldtype plugins once moved to core. We can later rename these in CB 2.0 during migration as needed.

Updated by krileon over 12 years ago Actions #2

Merge Ajax Points field then implement "Rating" and "Points" fieldtypes only. The below are the MODES available for these two new fieldtypes as it's pointless to have a bunch of fieldtypes when a simple parameter with IF can provide this functionality.

Rating Fieldtype
My Rating - rating field can only be changed by self
Your Rating - rating field can only be changed by others
Rating - rating field can be changed by anyone

Points Fieldtype
My Points - points field can only be changed by self
Your Points - points field can only be changed by others
Points - points field can be changed by anyone

Updated by krileon over 12 years ago Actions #3

The modes could instead be an access parameter as follows.

Self Only
Non-Self Only
Connections Only
Moderators Only
Custom View Access Level

Updated by krileon over 12 years ago Actions #4

Find a nice jQuery rating plugin for this as the functionality could be reused and helpful outside of just fields. Both of the below look decent and maintained.

RateIt: http://www.radioactivethinking.com/rateit/example/example.htm
Raty: http://wbotelhos.com/raty

Neither provide a points like usage though, which many need a separate jQuery plugin.

Updated by krileon over 12 years ago Actions #5

RateIt looks best as it uses div usage with dynamic background position swapping where Raty uses a bunch of image tags with their source being swapped.

Updated by krileon over 12 years ago Actions #6

Note the existing rating plugin technically will work, but it's out of date and uses old techniques with a dependency on the metadata plugin.

Updated by krileon over 12 years ago Actions #7

Raty has significantly better API usage, callback functionality, and parameters. Usage seams best of all 3 (Raty, RateIt, and existing jQuery Stars).

Updated by krileon over 12 years ago Actions #8

Give the Average, Total, and Vote Count to the jQuery so it can do client side re-calculate. Then send to the server for validation. This allows instant response to voting.

Updated by krileon over 12 years ago Actions #9

Review implementing calculation of probability. Basically true rating. Absolute rating just isn't accurate. For example 1 million 4 star votes should average up to say 4.5.

Updated by krileon over 12 years ago Actions #10

  • Status changed from Assigned to Resolved
  • % Done changed from 0 to 100

Updated by beat about 11 years ago Actions #11

  • Status changed from Resolved to Closed
Actions

Also available in: PDF Atom