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

{jr_embed_player_code} Index {jr_feed_reader}

{jr_favorite}


The {jr_favorite} Template Function is used for embedding an "Add to Favorites" link in a Template.

Parameters

Name Type Required Default Description
type string no audio The "type" parameter tells Jamroom the "type" of favorite that is going to be added - a "audio" favorite (default), or a "video" favorite.
id number yes n/a The "id" parameter tells Jamroom the ID of the media item being added.  This will be the $SONG_ID for a audio favorite, and the $VIDEO_ID for a video favorite.
template string yes n/a The "template" variable tells Jamroom which template to use as the "success" or "error" page on completion of successfully adding the media item to the user's favorites (or error if an error is encountered).
popup on/off no n/a If the popup parameter is defined (i.e. set to any value), then the "results" template will be shown in a popup window.  Leave this parameter out of the template function if you do not want a popup result window.
width number no 300 If you are using a popup results window, you can specify the width of the popup window with the width parameter.
height number no 200 If you are using a popup results window, you can specify the height of the popup window with the height parameter.
text string no "Add to Favorites" You can specify the "alt" text used in the link
class string no n/a You can specify a CSS class to use for the link using the "class" parameter.
tpl_dir string no n/a If you have specified a results template, you can define the template type (either "skin" or "theme") using the tpl_dir parameter.
skin string no n/a If you have set the tpl_dir parameter to "skin", you need to define the Skin Name that contains the results template.
theme string no n/a If you have set the tpl_dir to "theme", you need to define the Theme Name that contains the results template.
image string no n/a If the "image" parameter is defined, it will contain the FULL URL to an image to use as the "add to favorites" link.
button on/off no n/a If the "button" parameter is given, then the link to add the item to the User's favorites will be a form button.

 

Examples

embedded {jr_favorite} Template Function for adding a song to a User's Favorite when they click on a button:

{jr_favorite text="Add this song to your favorites!" button="true" class="jform button" id=$SONG_ID type="audio" template="script_favorite.tpl" popup="true" theme="Cobalt3"}

{jr_embed_player_code} page 113 of 171 {jr_feed_reader}
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