Jamroom Logo Jamroom 5 Core
is now Open Source!
Follow Jamroom on Twitter!

This document applies to Jamroom 3 only!
For current Jamroom 4 Documentation, visit the main Jamroom Documentation section.

{jr_rating} Index {jr_rating_image}

{jr_rating_form}


The {jr_rating_form} function is used for embedded a Rating Form into a Jamroom Template.

 

Parameters:

Name Type Required Default Description
band_id number yes n/a The band_id parameter is required to let Jamroom know the Artist/Member band_id the rating is for.
type string yes n/a The "type" parameter tells Jamroom what "type" of rating you want to create a form for. Valid values are:  song, video, photo, event, item, radio, blog and band.
media_id integer no n/a If you want to return the rating for an individual item, you need to pass in the "id" of the item as the media_id.  This would include the song_id, video_id, event_id, etc.
mode string no "select" The "mode" parameter tells Jamroom the type of form to create.  It can be one of 2 options: "image" for creating an image-based (i.e. "stars") rating form, or "select" which is a traditional drop down list of rating choices.
current_rating float no n/a If you are using an "image" based form, setting the current_rating will make it so when the user is viewing the rating form, this many image-based ratings will be preset to show the existing rating.
no_rate true/false no false If the "no_rate" option is set to "true", the the viewer will not be able to enter a rating.
refresh true/false no n/a If the "refresh" option is set to "true", then after the user has submitted the form, they will be refresh directly back to the screen that contains the rating form, instead of seeing their "result" in a separate window.
class string no "rating" By default, the form will be created to use a CSS class called "rating" - you can override the name of the class by passing it in as the "class" parameter.
choices comma separated list no 'your rating,excellent,very good,good,poor,dismal If you are using a "select" mode rating form, then you can provide the 6 different "options" that will be made available in the drop down (the first choice is instructions for the user and is not a valid rating choice).
style string no n/a If you are using a "select" mode rating form, you can pass in additional "style" parameters for use in the select form.
template string no n/a If you are using a "select" mode rating form, you can pass in the name of the error/success template that will be shown to the user IF you are not using the "refresh" parameter.

 

Example:

embedded {jr_rating_form} function call in a Skin Template:

{jr_rating_form mode="image" image="images/rating_back.png" type="user" band_id=$USER_BAND_ID media_id=$USER_ID no_rate="1" current_rating=$USER_RATING_AVERAGE}


{jr_rating} page 170 of 185 {jr_rating_image}
Solutions Products Support Community Company
Social Media Platform
Social Networking Software
Musician Website Manager
Community Builder
Jamroom 5
Jamroom 5 Modules
Jamroom Marketplace
Support Forum
Documentation
Support Center
Contact Support
Community Forum
Member Sites
Developers
About Us
Contact Us
Privacy Policy
©2003 - 2024 The Jamroom Network