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

Changing the index.php page for Profile Themes Index  

With the release of Jamroom 4, a entirely new Jamroom Skin and Profile Theme was created - Nova.  The new Nova Skin and Theme were designed to be very "interactive" with AJAX elements, as well as support for most Jamroom features and options.

Replacing the Jeroen Flash Player with a different Flash Player

By default, the Jamroom Nova Skin and Theme use the "Jeroen" Flash Player, which is a "fluid" flash player that features support for both audio and video, as well as embedded playlists.  It is easy to configure and supports many different options, so is a natural fit for the new Nova skin and theme.  However, if you have a custom flash player you would like to integrate in place of the Jeroen player, this guide will show you how to do that.

Step one - changes to Nova profile theme templates

First off we are going to make changes to the profile theme templates - these templates are located in jamroom/themes/Nova.  There are several templates that are used to create the flash player, and we'll want to update each one to use the flash player of our choice.  For our examples, we are going to switch over to using the Cobalt3 "Buy Now" Flash player, that is part of the Jamroom Payment Pack.

Modify the following templates:

  • jamroom/themes/Nova/player_audio_embed.tpl

change this:

{if is_file("`$JAMROOM_DIR`/include/jeroen/player_v4.swf")}

  {* Jeroen v4 player *}
  {jr_array name="fvars" key="playlist" value="right"}
  {jr_array name="fvars" key="playlistsize" value="285"}
  {jr_array name="fvars" key="backcolor" value="#949799"}
  {jr_array name="fvars" key="screencolor" value="#949799"}
  {jr_array name="fvars" key="frontcolor" value="#000000"}
  {jr_array name="fvars" key="lightcolor" value="#F7DD4F"}
  {jr_array name="fvars" key="repeat" value="list"}
  {jr_array name="fvars" key="autostart" value="true"}
  {jr_flash_player player_type="jeroen4" playlist_url=$play_url width="515" height="195" params=$fvars}

{else}

{* XSPF Audio Player *}
{jr_flash_player playlist_url=$play_url width="515" height="195" auto_play="yes"}

{/if}

to this:

{* XSPF Audio Player *}
{jr_flash_player playlist_url=$XSPF_HIFI_PLAYALL_URL player_type="`$JAMROOM_URL`/themes/Cobalt3/ds_mp3_300x200-Cobalt3_buy.swf" width="300" height="200" auto_play="yes"}

Note how we removed the Jeroen flash player section, and added in the new "player_type" option to the {jr_flash_player} function call - this tells Jamroom that you want to "override" the default XSPF player and use the specified URL for your flash player.

  • jamroom/themes/Nova/player_audio.tpl

change this:

{if is_file("`$JAMROOM_DIR`/include/jeroen/player_v4.swf")}

  {assign var="play_url" value="`$XSPF_HIFI_PLAYALL_URL`%26jeroen=1"}

  {* Jeroen v4 player *}
  <script type='text/javascript'>
  var so = new SWFObject('{$JAMROOM_URL}/include/jeroen/player_v4.swf','audio_player','515','195','9','#D4D7D9');
      so.addParam('allowfullscreen','false');
      so.addParam('allowscriptaccess','always');
      so.addParam('wmode','opaque');
      so.addVariable('usefullscreen','false');
      so.addParam('flashvars','file={$play_url}&playlist=right&playlistsize=285&backcolor=#949799&screencolor=#949799&frontcolor=#000000&lightcolor=#F7DD4F&repeat=list');
      so.write('player');
  </script>

{else}

{* XSPF Audio Player *}
{jr_flash_player playlist_url=$XSPF_HIFI_PLAYALL_URL width="515" height="195"}

{/if}

to this:

{* XSPF Audio Player *}
{jr_flash_player playlist_url=$XSPF_HIFI_PLAYALL_URL player_type="`$JAMROOM_URL`/themes/Cobalt3/ds_mp3_300x200-Cobalt3_buy.swf" width="300" height="200" auto_play="yes"}

again we have removed the references to the Jeroen player and replaced it with the reference to our own flash player.

  • jamroom/themes/Nova/player_radio.tpl

Empty the file and replace it with this:

{* get our TOP Radio Station for the player (as organized by the profile owner) *}
{jr_ranking mode="radio" band_id=$BAND_ID order="13" row_template="radio_id.tpl" show="1" tpl_dir="theme" theme="Nova" assign="radio_id" jr_active_mode="true"}
{assign var="play_url" value="`$MASTER_URL`/play.php?mode=radio&id=$radio_id&format=xspf"}
{jr_flash_player playlist_url=$play_url player_type="`$JAMROOM_URL`/themes/Cobalt3/ds_mp3_300x200-Cobalt3_buy.swf" width="300" height="200"}  

  • jamroom/themes/Nova/player_video_embed.tpl

change this line:

{jr_flash_player player_type="jeroen4" playlist_url=$play_url width="515" height="195" params=$fvars}

to this:

{jr_flash_player playlist_url=$play_url player_type="`$JAMROOM_URL`/themes/Cobalt3/ds_flv_277x260_Cobalt3_buy.swf" width="277" height="260"}

  • jamroom/themes/Nova/player_video.tpl

Replace entire contents of file with this:

{assign var="playurl" value="`$MASTER_URL`/play.php?mode=video&band_id=`$BAND_ID`&video_id=all&format=xspf"}
{jr_flash_player playlist_url=$play_url player_type="`$JAMROOM_URL`/themes/Cobalt3/ds_flv_277x260_Cobalt3_buy.swf" width="277" height="260"}

  •  jamroom/themes/Nova/player_channel.tpl

Replace entire contents of file with this:

{jr_ranking mode="channel" band_id=$BAND_ID order="13" row_template="channel_id.tpl" show="1" tpl_dir="theme" theme="Nova" assign="channel_id" jr_active_mode="true"}
{assign var="play_url" value="`$MASTER_URL`/play.php?mode=channel&id=$channel_id&format=xspf"}
{jr_flash_player playlist_url=$play_url player_type="`$JAMROOM_URL`/themes/Cobalt3/ds_flv_277x260_Cobalt3_buy.swf" width="277" height="260"}


Changing the index.php page for Profile Themes page 171 of 171
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