solved How to allow free audio file downloads ONLY to logged in members

radiomusicgroup
radiomusicgroup
@charles-brady
9 years ago
107 posts
I am struggling with how to allow an audio file to be downloaded ONLY by a member who is logged into the system. When I turn on the option to allow downloads it allows for downloading from anyone.

Is it still possible to limit downloading and streaming of music files to only members who are logged in?
updated by @charles-brady: 01/18/16 05:37:25AM
brian
@brian
9 years ago
10,148 posts
When viewing one of the audio file detail pages (as a master admin) click on the far right button in the audio header that says "configure these buttons and the order they appear in". This will take you to the Detail Buttons page.

Click on the "Modify" button to the right of the "download audio button" and under the "Group" select form element choose "logged in users" and save.

Now the download button will only show to logged in users.

Hope this helps!


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
radiomusicgroup
radiomusicgroup
@charles-brady
9 years ago
107 posts
Wonderful! That worked!

Now if I could figure out how to hide the streaming button for only logged in users.
brian
@brian
9 years ago
10,148 posts
mattbrady:
Wonderful! That worked!

Now if I could figure out how to hide the streaming button for only logged in users.

Glad that worked!

99% of our users WANT the streaming option to show - if you want to hide it for logged in users you'll need to go into the ACP -> Media -> Audio Support -> Templates and customize the "item_detail.tpl" file - change this:

{assign var="ap" value="`$_conf.jrCore_active_skin`_auto_play"}
<br>{jrCore_media_player module="jrAudio" field="audio_file" item=$item autoplay=$_conf.$ap}<br>

To this:
{if !jrUser_is_logged_in()}
    {assign var="ap" value="`$_conf.jrCore_active_skin`_auto_play"}
    <br>{jrCore_media_player module="jrAudio" field="audio_file" item=$item autoplay=$_conf.$ap}<br>
{/if}

Then the streaming player on the detail page will only show to users that are NOT logged in. You can then repeat this for the item_list.tpl file as well.

After you've made your changes make sure to put a checkmark in the "active" column for those templates, save, then reset caches.

Hope this helps!


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
radiomusicgroup
radiomusicgroup
@charles-brady
9 years ago
107 posts
@brian I am so sorry man. My brain dropped a word. I meant limiting the streaming of music files to only members who are logged in.

I only want an approved, logged in radio station user to be able to hear or download music files.
brian
@brian
9 years ago
10,148 posts
Ahh - then change:

!jrUser_is_logged_in()

to

jrUser_is_logged_in()

The ! says "not", so just remove it :)


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
radiomusicgroup
radiomusicgroup
@charles-brady
9 years ago
107 posts
Tried that but the streaming button still worked. The only thing that changed was when you clicked onto the song title you got a server error page... Not sure if it matters but I'm working with the Projam Light skin.

I have also encountered an issue with the download button. It works keeping the button hidden from everyone but a logged in user everywhere EXCEPT the music list page. I attached a picture.
radiomusicgroup
radiomusicgroup
@charles-brady
9 years ago
107 posts
I have visited a few other JR5 sites and found the same issue with downloads being available in the music lists. The download option is not available on the song detail page or on the artist audio page but they are available on any of the music lists.

Is there anyway to only allow members that are signed in to access music? That seems to be a basic function that has been a part of the previous JR versions over the past 9 years that we've used it.


I'd love to do the hosting here but right now I don't think JR5 will work if we can't protect the record labels and artists music from unauthorized downloads. They allow us to give the music to radio stations for broadcast purposes but not to anyone who just stumbles onto the site.

I keep wondering if this is a quota issue? In previous versions it seemed I had much more control over what content was accessible to unregistered visitors and different member quota levels.

Maybe I'm overlooking something?
radiomusicgroup
radiomusicgroup
@charles-brady
9 years ago
107 posts
SOLVED!!!!!!!!!

1 - Go to USER ACCOUNTS
2 - Change site privacy

BAM!!! No one but a logged in user can see or access your music files.

Now if I could just get that download button for a 128K download along with the current 320K one! But I'll take this victory and finally go to bed....
WonderfulPic.jpg
WonderfulPic.jpg  •  59KB