solved Hide download button for a particular quota

alt=
@andrusito
8 years ago
302 posts
Hello,

I've read this thread but I don't find a solution for me there:

https://www.jamroom.net/the-jamroom-network/forum/installation-and-configuration/34570/question-on-allowing-streaming-but-limiting-downloads-to-specific-quotas-or-profile-types

I've created a new quota. I want to block downloads for this quota ONLY.

On that thread @paul shared this piece of code:

{if $_user.profile_quota_id == x}
    // Download button code here
{/if}

But, this is the code that build my buttons (attached image):

{jrCore_item_list_buttons module="jrAudio" field="audio_file" item=$item}

So, how can I hide the download button just for this new quota (id 9)
updated by @andrusito: 07/06/16 12:44:05AM
michael
@michael
8 years ago
7,748 posts
click on that levels button on the right (in your screenshot) click MODIFY on the download button and select the quotas it should show for.
alt=
@andrusito
8 years ago
302 posts
Yes I did it, but it doesn't work.

The button appears in all quotas, even when I choose some of them.

Also when I select the quotas and set the Group to 'no group restriction, I have to login to see the download button.

It should work the way you mention, I guess.. but not for me :(

pd: I get this message when saving buttons changes: invalid button offset

What does it means?
updated by @andrusito: 03/04/16 03:32:46AM
alt=
@andrusito
8 years ago
302 posts
@paul can you help me please?
paul
@paul
8 years ago
4,332 posts
Its basically what Michael said, but there is a bit of 'reverse logic' going on in that setting.
See my screenshot.
Basically, if you want the download button not to show to a particular quota(s) you need to set all the quotas it does show to. So looking at my screenshot, see that the download button shows to users in the 'admins' and 'ning' quotas but not the 'example quota.
Also note that any group settings will take priority so disable those, as I have done.
hth


--
Paul Asher - JR Developer and System Import Specialist

updated by @paul: 03/04/16 04:57:09AM
douglas
@douglas
8 years ago
2,793 posts
If your looking at it as the master admin, you might try logging in as a user from that quota instead and see if the button is showing then.


--

Douglas Hackney
Jamroom Team - Designer/Developer/Support
FAQ-Docs-Help Videos
alt=
@andrusito
8 years ago
302 posts
Ok I understand what you all said, but I think I was a little confused about it and maybe it doesn't help me.

What I really want is to hide/remove the download button from profiles under 'Quota X' (for example)
It must be hidden to everyone.

Look at this: if you are visiting an artist profile created under 'Quota X' you will be able to listen its music but not to download it, even if you are a registered user or a guest.

Is that possible?

Sorry for the misunderstanding :)
douglas
@douglas
8 years ago
2,793 posts
Sorry, I don't think I did a good job of explaining that...

The master admin will see everything, you can't really hide anything from the master admin, however... if you do as Micheal has suggested,

micheal:
click on that levels button on the right (in your screenshot) click MODIFY on the download button and select the quotas it should show for.

then profiles/users in the quotas you've hidden the download button from should not see the download button when logged in.

The only way to test that is to login as a user from the quota you've hidden the button from.

Hope that makes more sense.


--

Douglas Hackney
Jamroom Team - Designer/Developer/Support
FAQ-Docs-Help Videos
alt=
@andrusito
8 years ago
302 posts
Oh no no, I get what you said in your first message. That was clear for me :D

But I'm sure that solution won't help me 'cause I want to hide the download button to everyone.

The download button must not appear on profiles under 'Quota X'. It does't matter if you're a registered user, you will not see it. No one will see it, neither guests.

I think a more suitable solution for me would be a setting like:

ACP > Audio > Quota config > Selected quota: Quota X > Block downloads: YES/NO

But it doesn't exist..
paul
@paul
8 years ago
4,332 posts
I still don't understand why the above solution Michael and myself explained will not do what you want?


--
Paul Asher - JR Developer and System Import Specialist
alt=
@andrusito
8 years ago
302 posts
This is what Douglas said:

douglas:
then profiles/users in the quotas you've hidden the download button from should not see the download button when logged in.

Look, I want to block downloads. That means, all profiles created under 'Quota X' (example) will have their mp3 ONLY for listening and NOT for downloading.

And the solution you mentioned modifies the download button behavior for ALL quotas.
I want to modify the download button behavior ONLY for 'Quota X' profiles.

Maybe this is the suitable way to ask:

Is there a way in JR5 to set up a quota/profile type that would only allow streaming but not downloading?

Thanks everyone!!
paul
@paul
8 years ago
4,332 posts
Maybe it'll be easier and quicker if you send us the site url and admin logins, along with the quota you want downloads blocked for. Send them to support[at]jamroom[dot]net
Thanks


--
Paul Asher - JR Developer and System Import Specialist
alt=
@andrusito
8 years ago
302 posts
Oh great, thanks!
paul
@paul
8 years ago
4,332 posts
Try it now. I just did what was described above.


--
Paul Asher - JR Developer and System Import Specialist
alt=
@andrusito
8 years ago
302 posts
Oh thanks, I appreciate it but it is the same I've done before and the result is not what I expect.

Look, this guy belongs to 'Cuenta de famosos' quota: http://devocionmusical.com/andrusito/audio

And this one, belongs to 'Cuenta gratis' quota: http://devocionmusical.com/jaime-echevarria/audio

As you can see, in both profiles, the download button is missing.

Actually, in all artist profiles the download button is missing. As a guest I should see that button in all quotas's profiles except in 'Cuenta de famosos' quota's profiles.

Remeber, "as a guest" because I don't want users to login in order to download mp3s.
paul
@paul
8 years ago
4,332 posts
OK - Understand the issue now. We need to add in a bit of code to the audio module in order to do this.
Will let you know when its done.
Thanks


--
Paul Asher - JR Developer and System Import Specialist
alt=
@andrusito
8 years ago
302 posts
Thanks so much Paul!
alt=
@andrusito
8 years ago
302 posts
Hi Paul, any news on this?

Thanks!
paul
@paul
8 years ago
4,332 posts
It will be added in the next Core release shortly. You'll need to edit a couple of templates to exclude the download button from specified quotas. Will explain fully when the update is released.


--
Paul Asher - JR Developer and System Import Specialist
alt=
@andrusito
8 years ago
302 posts
Ok Paul, sounds good. Do you know when is release?

Thanks for your support.
paul
@paul
8 years ago
4,332 posts
It was released yesterday - Check your marketplace


--
Paul Asher - JR Developer and System Import Specialist
alt=
@andrusito
8 years ago
302 posts
Good! I'm done with that :)

Let me know what's next,
paul
@paul
8 years ago
4,332 posts
OK - In your jrAudio item_detail.tpl template find this code at about line 11 -

{jrCore_item_detail_buttons module="jrAudio" field="audio_file" item=$item exclude=$ex_dl}
and replace it with this -

			{$ex_dl = ''}
            {if $item.profile_quota_id == 2}
                {$ex_dl = 'jrAudio_item_download_button'}
            {/if}
            {jrCore_item_detail_buttons module="jrAudio" field="audio_file" item=$item exclude=$ex_dl}
Set the quota_id test value to the ID of the quota you want to exclude.

Similarly in the jrAudio item_list.tpl at line 35 or thereabouts.

hth


--
Paul Asher - JR Developer and System Import Specialist
alt=
@andrusito
8 years ago
302 posts
Hey Paul, that worked!

Thanks!!

Tags