New extension: PcStarRank

This extension/module provides an ‘all included’ star ranking system to rank content on your site. It is ‘attachable’ with relatively little effort to almost any content on your site (see details in extension’s page given below for full specs/details).


  • Provides a plug & play style component that is ‘attachable’ to probably any content on your Yii site that has a separate DB table for it (or multiple tables). Using it, your content can be ranked by users who have permission to rank content.
  • Should support multiple rendered copies of it on the same page, for several rank-able content items (I didn’t test it so far but designed it for this use case and highly likely that this works).
  • Automatically update the ranked record in its own DB table. This is useful for sorting records (e.g., "articles") based on their average rank.
  • Rate voting is allowed only once and once voted the UI becomes readonly (server side has its own decision making on this to prevent forging attempt from hampered client side).
  • All printed messages are translatable. Make sure to configure your i18n setup of Yii to have this in effect.


  • This module uses internally Yii’s built in CStarRating to render the actual rating UI but this UI can be replaced with whatever you prefer.
  • The code is not as clean as I’d want it to be. I struggled a lot with CStarRating UI options (and came non-victorious… ). See project page and plenty of inline comments in the code itself.

Please comment on the GitHub project page so we can keep track of feedback most effectively.

Extension page

Github project page


Thanks for this nice module.

I was trying the module but it is always giving me an alert that am not logged in, eventhough i am.

"Sorry - only registered, non-blocked users are allowed to rank content. Please register first. "

What would the problem be?


First, for the record and for other people’s sake, we’ve conducted a little private conversation on this. Not many details in it but still.

Now for business:

  • [size=2]I cannot reproduce the problem you report. In my environment - a site that I develop and which I cannot release - everything works fine (in the reported aspects, at least).[/size]
  • [size=2]Have you made sure to assign the testing user the RBAC permission of “[/size]star rank content” ? This is important and without it you’ll get this error message.


Hi Boaz,

Thank you very much!

The update you made recently to the extension solved it all!

I was just wondering if a user can update their vote? or they can only vote once and for all for a certain model id?

Am interested in allowing users to update their vote always.

Please let me know what is the supposed widget behaviour here… just to make sure am on the safe side, and I will try to edit as desired then.

Once again, THANK YOU!!


I’m happy that it works for you now.

No, the module does not support changing one’s vote.

You can always fork the project on github and develop this. I’ll be happy to review a pull request if you finish such a functionality and want to contribute it back (and I hope I’ll have the time resources to do so…).

Good luck with it!