Jamroom Logo   Get Jamroom now for as low as !
The Powerful Social Media Platform
free download!
key features
key features
Newsletter
E-mail Address:

Spotlight
Never2Funky Jamrooms EPK
270579 "The Jamroom system has greatly helped us by not only providing Electronic Press Kits for the artists on our record label "N2F Records", but we also use the Jamroom system as an A&R system for artists wishing to virtually audition for our label or use the system for Electronic Press Kit purposes. The Jamroom system is the most sophisticated and feature rich system of its kind, and one of the most valuable additions to our site."
{jr_media_access} {jr_media_access} Index {jr_not_logged_in} {jr_not_logged_in}
 

{jr_media_play_key}


The {jr_media_play_key} function is used for adding valid Media Play Keys into the Jamroom database.  This function was first introduced in Jamroom Core 3.3.8.

Parameters

Name Type Required Default Description
mode string no n/a The "mode" parameter can be used to tell the {jr_media_play_key} function to either "add" a key to a temporary keychain, or "save" the keychain to the database.  By default, if the {jr_media_play_key} function is called without a mode parameter, the key is generated and saved in the same function call.  If the {jr_media_play_key} function is being called in a "loop" (in a row_template that is being used in the Jamroom Ranking System for example), then it is much more efficient to call the {jr_media_play_key} function with the "add" parameter in each row, the call it once in the footer_template with the "save" parameter.
media_id number yes* n/a

The media_id parameter is the $SONG_ID or $VIDEO_ID to add to the Play Keys.

*This parameter is required if no "mode" parameter is given, or the mode parameter is set to "add".

assign string no n/a By default the {jr_media_play_key} function returns the key that was created - if you would like to store this key in a variable for further processing, you can assign the output to a template variable.

 

Example

Example embedding the {jr_media_play_key} into a Jamroom Ranking System "song" mode row_template (note that the lack of a "mode" parameter means that a database query will be executed for each call of the row template):

<a href="stream.php?mode=song_hifi&band_id={$BAND_ID}&song_id={$SONG_ID}&k={jr_media_play_key media_id=$SONG_ID}">Play song_id {$SONG_ID}</a>

 

A more efficient way is to use the following code in the row_template:

<a href="stream.php?mode=song_hifi&band_id={$BAND_ID}&song_id={$SONG_ID}&k={jr_media_play_key mode="add" media_id=$SONG_ID}">Play song_id {$SONG_ID}</a>

And then in the "footer_template" call it with the "save" mode, which then stores all generated keys in the database in a single query:

{jr_media_play_key mode="save"}

 

{jr_media_access} {jr_media_access} page 161 of 186 {jr_not_logged_in} {jr_not_logged_in}
Home | Download | Support | FAQ | Demo | Members | Purchase | Marketplace | Contact | Privacy
©2003 - 2009 Talldude Networks, LLC.