{jr_ranking}
{jr_ranking} is used for embedding a Jamroom Ranking System list and output into a Jamroom skin template.
Note: the {jr_ranking} template function can use all of the parameters listed in the main Jamroom Ranking System document as well.
Parameters:
Name |
Type |
Required |
Default |
Description |
mode |
string |
yes |
"band" |
the "mode" parameter tells Jamroom what type of ranking call you are making - artist, comment, event, fan, favorite, member, page, photo, radio, song, spotlight, store, user, vault, video and video_spotlight. |
order |
integer |
yes |
"1" |
relates to one of the list-orders that the ranking.php script accepts. It varies by mode, see Ranking for details. |
show |
integer |
no |
n/a |
limits the number of entries returned to the "show" amount. |
header_template |
string |
no |
n/a |
defines the template to use as the HEADER template for the output. |
row_template |
string |
no |
n/a |
defines the template to use as the ROW template for the output. |
footer_template |
string |
no |
n/a |
defines the template to use as the FOOTER template for the output. |
tpl_dir |
string |
no |
"skin" |
directory containing the Jamroom template - can be "skin" or "theme" |
theme |
string |
no |
n/a |
if a tpl_dir value of "theme" is given, then the name of the Artist Theme needs to be passed in with the theme parameter |
skin |
string |
no |
n/a |
The skin parameter tells the function to look in the skins/<skin_name> directory to find the template. If this is not supplied, the function will look in the Active Skin directory. |
band_id |
mixed |
no |
n/a |
If a single band_id (or array of band_ids) is is given, then only events from the given ID's will be returned. |
cache_time |
integer |
no |
n/a |
If the cache_time parameter is given, the output of the function will be cached for the given number of seconds. |
assign |
string |
no |
n/a |
optional "assign" parameter - if given, the output of the function will be assigned to a template variable of the same name. Note: The "assign" parameter does not work in Profile Theme templates. |
Examples:
embedded {jr_ranking} function call in template, displaying the artist's 5 most recently added photos:
{jr_ranking mode="photo" order="4" show="5" row_template="custom_photo.tpl" band_id=$BAND_ID tpl_dir="theme" theme="Cobalt"} |
embedded {jr_ranking} function call to display the artist's 10 most played songs:
{jr_ranking mode="song" order="5" show="10" row_template="custom_song_row.tpl" band_id=$BAND_ID} |
|