Difference between revisions of "How to change the rating star images"

From JReviews Documentation
Jump to: navigation, search
Line 2: Line 2:
  
 
[[File:RatingStars.jpg]]
 
[[File:RatingStars.jpg]]
 
 
By default, rating_stars.png is used. If you want to use different stars, just add this code into your custom_styles.css and change the file name:
 
 
<source lang="css">
 
.rating_star_user,
 
.rating_star_editor ,
 
.rating_star_user div,
 
.rating_star_editor div {
 
    background-image: url(images/rating_stars2.png);
 
}
 
 
/* rating form */
 
.ui-stars-star a {
 
    background-image: url(images/rating_stars2.png);
 
}
 
</source>
 
 
 
The above code is for JReviews 2.3. If you use JReviews 2.4, paste this code instead:
 
  
  

Revision as of 12:51, 7 March 2015

If you want to change the rating stars, you only need to define a different stars background image. There are several sprite images for rating stars available in JReviews themes:

RatingStars.jpg


.jrRatingStarsUser, 
.jrRatingStarsEditor, 
.jrRatingStarsUser div, 
.jrRatingStarsEditor div { 
    background-image: url(images/rating_bars.png); 
}
 
/* rating form */
.ui-stars-star a {
    background-image: url(images/rating_bars.png);
}


If you want to use your own stars image, place the image file into \theme_css\images\ folder in your theme. Make sure your custom stars have the same dimensions, otherwise you will need to modify styles for dimensions also.