Jamroom Logo Jamroom 5 Core
is now Open Source!
User Support Forum Archive (Read Only)
User Site Design, Integration and Customization:
Embedding a radio into a theme
sweet



Joined: 24 Jul 2005
Posts: 1021

Posted: 01/23/10 08:07 
Hello,

I was told that the assign function is not supported and should not be used in a Theme template, so how do I get this to work then?

Thanks,
s




Code

http://www.jamroom.net/Jamroom4_Flash_Player_Integration

Example 1 - Embedding a radio station player into a theme template

Place the following code in the theme template in which you would like the flash player to appear:
{jr_ranking mode="radio" order="5" band_id=$BAND_ID show=1 row_template="get_radio_id.tpl" assign="TOP_RADIO_ID"}
{jr_flash_player player_type="`$JAMROOM_URL`/themes/Cobalt/dsplayer_cobalt_small.swf" radio_id=$TOP_RADIO_ID height="250" width="160"}


At this point, a template called get_radio_id.tpl needs to be created in the skins/Cobalt directory containing the following code:
{$RADIO_ID}


Back to top
daddysylem
DS Flash Players


Joined: 30 Mar 2005
Posts: 4086
Location: Southern California

Posted: 01/23/10 21:22 
I finally found a way to put the Members Radio Player anywhere on the Members Pages.
And I still don't know if this is the correct way to do this, so I am posting it here to see if Brian can give his input when he gets a chance.

This assumes that you only allow your Members to have 1-Radio Station. And I tested this in the Cobalt3 Theme and it will have references to the Cobalt3 Theme in it. So if you want to use this in another Theme, you will need to change the references for Cobalt3 to whatever Theme your using.


1. Create a templated called member_radio.tpl
And put the following code into it......

Code
<table width="100%" celpadding="0" cellspacing="0" border="0">
<tr>
<td align="center">

{jr_flash_player radio_id=$RADIO_ID player_type="`$JAMROOM_URL`/themes/Cobalt3/ds_mp3_300x200-Cobalt3_buy.swf" width="300" height="200" player_playlist_title=$RADIO_NAME}


</td>
</tr>
</table>


2. Create another template called member_radio.cfg
And put this code into it......

Code
member_radio.tpl


3. Edit the Cobalt3/themes/ theme.cfg
And add this to the bottom of that file.

Code
# Radio Player
member_radio.cfg | member_radio.php


4. Edit the the Template where you want the player to show up and add this code...

Code
{jr_theme_php_include file="member_radio.php"}


5. Then upload all the templates and rebuild your Artist Theme.

This seems like a complicated way to do this, but it is the only way I could find to actually put the Members Radio player on their page and consistently make it work.

Let me know if you can find another way....... Wink


_________________
I have no idea why I do this..................
Email: daddysylem[at]dsplayerskins.com
DSPlayerSkins.com
GCFireSprinkler.com
Back to top
elixir



Joined: 28 Jun 2008
Posts: 599

Posted: 01/23/10 21:41 
before you put the code for the flash player, i think it is necessary to check to see if the member has any radio station....if the member has a radio station, your code should work fine but if he/she hasn't then the player will not load any playlist.

Back to top
daddysylem
DS Flash Players


Joined: 30 Mar 2005
Posts: 4086
Location: Southern California

Posted: 01/23/10 23:40 

elixir:
before you put the code for the flash player, i think it is necessary to check to see if the member has any radio station....if the member has a radio station, your code should work fine but if he/she hasn't then the player will not load any playlist.


Yes your right...... Smile
So maybe this would work,

Modify #1 member_radio.tpl to look like this....

Code
<table width="100%" celpadding="0" cellspacing="0" border="0">
<tr>
<td align="center">

{if $QUOTA_RADIO == 'yes' && $RADIO_ID > 0}
{jr_flash_player radio_id=$RADIO_ID player_type="`$JAMROOM_URL`/themes/Cobalt3/ds_mp3_300x200-Cobalt3_buy.swf" width="300" height="200" player_playlist_title=$RADIO_NAME}
{else}

{/if}

</td>
</tr>
</table>



_________________
I have no idea why I do this..................
Email: daddysylem[at]dsplayerskins.com
DSPlayerSkins.com
GCFireSprinkler.com
Back to top
Display posts from previous:   
User Support Forum Archive (Read Only)
User Site Design, Integration and Customization

 
Solutions
• Social Media Platform
• Social Networking Software
• Musician Website Manager
• Community Builder
Products
• Jamroom Core
• Jamroom Addons
• Jamroom Modules
• Jamroom Marketplace
Support
• Support Forum
• Documentation
• Support Center
• Contact Support
Community
• Community Forum
• Member Sites
• Developers
Company
• About Us
• Contact Us
• Privacy Policy
©2003 - 2010 Talldude Networks, LLC.