Project

General

Profile

Actions

Feature proposal #4221

closed

Rewrite rating field and implement as core fieldtype

Added by krileon about 11 years ago. Updated about 10 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.

Actions #1

Updated by krileon about 11 years ago

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.

Actions #2

Updated by krileon about 11 years ago

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

Actions #3

Updated by krileon about 11 years ago

The modes could instead be an access parameter as follows.

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

Actions #4

Updated by krileon about 11 years ago

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.

Actions #5

Updated by krileon about 11 years ago

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.

Actions #6

Updated by krileon about 11 years ago

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.

Actions #7

Updated by krileon about 11 years ago

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

Actions #8

Updated by krileon about 11 years ago

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.

Actions #9

Updated by krileon about 11 years ago

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.

Actions #10

Updated by krileon about 11 years ago

  • Status changed from Assigned to Resolved
  • % Done changed from 0 to 100
Actions #11

Updated by beat about 10 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF