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_theme_downloads} Index {jr_theme_logged_in}

{jr_theme_favorite}


{jr_theme_favorite} is used for embedding an Image or textual Link into an Artist / Member Theme that allows the viewing user the ability to add a Song or Video to their "favorites".  Note that you must have Favorites enabled for your Jamroom, and the Jamroom Bonus Pack must be installed and working for this function to work correctly.  Also, the favorite links will NOT show if you have set the Jamroom Config -> Account Settings -> Automatic Favorites setting to "yes".

Note: {jr_theme_favorite} is a deprecated function, and should no longer be used in Jamroom 3.1 and newer.  The {jr_favorite} template function can perform the same functions as the {jr_theme_favorite} template function, but with better support.  This page has been left here for reference purposes only.
Note: This Template function ONLY WORKS within Jamroom Artist/Member Theme templates - it will not work in the Jamroom Skin Templates located in the jamroom/skins directory.
 

Parameters

Name Type Required Default Description
id integer yes n/a The id parameter is the song_id or video_id to add - i.e. id=$SONG_ID or id=$VIDEO_ID
template string no jr_favorite.tpl The name of the template that will be displayed when the user clicks on the image or text to add the entry to their favorites.
tpl_dir string no skin The "type" of template that is being used - either "skin" or "theme"
skin string no n/a The name of the Jamroom "skin" that the template is found in
type string yes audio the type parameter tells Jamroom the "type" of Favorite that will be added.
image string no n/a If the image parameter is given, then the URL that is provided will be used the image that the User will click on to add the entry to their favorites.
text string yes n/a The "text" parameter is used the <img> "alt" tag, if an image parameter is given, otherwise it is used as the linked text the User must click on to add the current entry to their favorites.
popup string no "no" Set the popup parameter to "yes" to have the favorites added notification popup in a separate popup window.
width integer no 300 If the popup parameter is used, then the width of the popup window can be set with the width parameter.
height integer no 200 If the popup parameter is used, then the height of the popup window can be set with the height parameter.

 

Example

Example embedding the {jr_theme_favorite} Template function into an Artist / Member theme template:

{jr_theme_favorite image="`$JAMROOM_URL`/skins/Cobalt/images/html_favorite.png" text="Add to Favorites!" id=$SONG_ID type="audio" popup="true" tpl_dir="skin" skin="Cobalt"}


the contents of the jr_favorite.tpl template file, found in the jamroom/skins/Cobalt directory (as used in example above):

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<head>
<title>Success!</title>
<link href="{$JAMROOM_URL}/skins/Cobalt/Cobalt.css" rel="stylesheet" type="text/css" media="screen">
<!--[if gte IE 5.5000]>
<script type="text/javascript" language="javascript" src="{$JAMROOM_URL}/include/jamroom_pngfix.inc.js"></script>
<![endif]-->
</head>
<body style="padding: 10px">

  <div class="container">
  <div class="content" style="width: 100%">
    <div class="head-1" style="padding: 10px 5px 15px 50px">
      <span style="font-size: 22px">SUCCESS!</span>
    </div>
    <div class="body-1">
      <span class="large-link-txt">You have successfully added &quot;{$MEDIA_NAME}&quot; to your favorites!</span>
    </div>
  </div>
  </div>

  <div class="spacer-footer" style="height: 25px; text-align: center">
    <input type="button" value="close" class="button" onclick="window.close();">
  </div>

</body>
</html>

 

Template Variables available in jr_theme_favorite template:

Variable Description
{$MEDIA_NAME} The Name of the Song or Video that was added to the User's Favorites
ALL Media Every column for the song or video, from the jamroom_song_info or jamroom_video table, is available in the template, capitalized.
ALL User Every column from the jamroom_user table is available in the template, and is reprsentative of the User who added the entry to their favorites.

{jr_theme_downloads} page 103 of 185 {jr_theme_logged_in}
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