The Fivestar Extra module allows Fivestar rating of comments and users. It was made possible by the support of quicksketch, making certain changes to Fivestar that I needed. I'm grateful for that.

If the content type being rated is not a node, however, Fivestar uses hard-coded defaults in certain places. In particular, the number of stars is always returned as 5.

This causes some bugs in Fivestar Extra.

I'm requesting a way to override these defaults for other content types.

quicksketch:

Seems like we could use a generic "fivestar_get_settings($content_type, $content_id)" function that pulls in settings for a particular content type/id combination.

Previous discussions touching this issue:


http://drupal.org/node/280735#comment-1070105
http://drupal.org/node/317317#comment-1540114
http://drupal.org/node/326436#comment-1539122

Fivestar functions affected:


fivestar_vote() (line 259)
fivestar_static() (line 729)

Suggestion


I realise you have a lot of things to consider when you make structural changes to this module. This is just my 2 pence:

Perhaps a $fivestar_settings array is fetched by these functions, and that, when fetched, drupal_alter() is called on it with the $content_type and $content_id?

Comments

Taxoman’s picture

Version: 6.x-2.x-dev » 7.x-2.x-dev
ericduran’s picture

I mention this in #1107300: Ideas and thoughts for a 3.x Branch but I guess I'm move priority and implement it in 2.x

ericduran’s picture

Version: 7.x-2.x-dev » 6.x-2.x-dev

Just read the entire issue. This is very specific to the 2.x branch. Switching version back. I'll create a new issue for the fivestar 7.x branch about supporting entities.

ericduran’s picture

anyone interested in this feature please comment over at #1139594: Create an exposed star formatter

Thanks.

ericduran’s picture

Status: Active » Fixed

@likeless is this still a problem ?

By looking at the other links it seems like the problems have been resolved.

Closing ticket, please open the issue up again if there's still some changes required.

Thanks.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.