Jump to content

Comments fieldtype with star rating


dotnetic
 Share

Recommended Posts

I added a star rating system and a title field to the comments fieldtype. So a user on the frontend can use a nice star rating like on Google Play (done with a pure CSS solution inspired by Lea Verou). The rating in the backend is displayed as a number in a text field.

You can download the module from https://jensmartsch.de/FieldtypeCommentsRating.zip

I will add it to the modules directory when I have more time.

After downloading extract it to your site/modules/FieldtypeCommentsRating directory.

Then install the modules "FieldtypeCommentsRating" and "FieldtypeCommentsRatingAdmin" 

via ProcessWire -> Modules -> Page -> New.

After that create two new fields "ratingTitle" and "rating" or use your own naming. Then add them to a template.

To get it working on the frontend, copy the code of the file rating.php where you want the output to appear. After that add rating.css and FontAwesome (or your own icon-font) to your website.

After that you can use the module. Have fun!

post-1299-0-16275300-1441495117_thumb.pn

  • Like 7
Link to comment
Share on other sites

  • 2 weeks later...

I have found an error: The voting system doesnt work because the field "field_commentsrating_votes" is not present. It seems that this field will not be produced during the installation. Only the standard field " field_comments_votes" from the standard comments without rating is present.

SQLSTATE[42S02]: Base table or view not found: 1146 Table '7232549db11.field_commentsrating_votes' doesn't exist
Link to comment
Share on other sites

  • 10 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...