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}
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......
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.
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.
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.