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_form} Index {jr_search}

{jr_rating_image}


The {jr_rating_image} template function is a function to help show "rating" images, on a scale of 0 to 5.  This is very helpful and will keep you from having to create large if/else statements in your templates, as the logic is handled internally by the template function.  Also - it can create rating "images" in any HTML color (the image is in fact a small bit of HTML instead of an actual image), with gradiated colors to help make it look better.  Alternately, a real image can also be used, as well as any HTML or character.

Function Parameters

Name Type Required Default Description
rating float yes 0.0 The "rating" parameter is the value that you want converted into an image/HTML rating display. 
image string yes actual image

The "image" parameter tells Jamroom the type of "image" that will be created, and can be one of the following:

  • "character" - if defined as "character", the output image will be composed of the character given as the "character" parameter - i.e. character="#" would cause the resulting image to be created using the # character.
  • "html" - if defined as "html", then Jamroom will create an HTML "image".
  • "image" - default, the image MUST be given withy a # character to indicated where the rounded average number will appear - i.e. "rating_#,gif" woudl mean you would have rating_0.gif -> rating_5.gif located in the jamroom/themes/Theme_Name/images directory.  It is here that Jamroom will figure out which image to use.
theme string no n/a If the the {jr_rating_image} function is being called from within a Profile Theme template, then the name of the theme must be given - this is required for Jamroom to be able to find the necessary image, or use the appropriate custom theme style the Profile may have created.
skin string no n/a If the the {jr_rating_image} function is being called from within a Skin template, then the name of the skin must be given - this is required for Jamroom to be able to find the necessary image, or use the appropriate color style.
band_id integer no n/a If being used in a Profile Theme template, you can give the band_id and this will ensure the proper color is used for the image if the Profile is using a Custom Profile style.
color hexidecimal no 006699 If the "color" parameter is given, Jamroom will use this color as the "base" color for the resulting image.  Note that this only has an effect if the "image" parameter is "character" or "html".  This needs to be the 6 digit HTML hex color code without the "#" sign.
color_mod float no 1.20 The "color_mod" parameter tells Jamroom the "modulation" to use on the resulting generated rating image.  Note that this only applies if the "image" parameter is "character" or "html".  This setting affects how much "lighter" the resulting image gets as the rating image gets longer.  Set this to a smaller value (i.e. 1.05) to make the color not change so fast, or higher (i.e. 1.35) to make the color get lighter in a shorter length.
character string no &raquo If you are using an image parameter of "character", then you can give the character to use in the resulting rating image.  This can be any string or individual HTML character.
layout string no horizontal If using the "html" or "character" image parameter, then you can also specify the "layout" of the resulting rating image.  Valid values are "vertical" and "horizontal".
class string no n/a If the color to be used in the rating image comes from a CSS file, the "class" parameter can be used to define the CSS class name that contains the background-color specification for the rating image.
style string no n/a Additional inline CSS styling can be applied via the "style" parameter - i.e. style="width:20px;"


Example using {jr_rating_image} function usage:

{jr_rating_image band_id=$BAND_ID rating=$BAND_RATING_AVERAGE image="html" class="rating" theme="Sage"}

 


{jr_rating_form} page 171 of 185 {jr_search}
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