solved Album Downloads

MAD
MAD
@madc
10 years ago
600 posts
I have been chatting with @brian about this and he said to bring it into the forum.

We have some bands that allow say 2 out of 10 songs to be downloaded out of their album via the
downloadable audio checkbox in the audio upload form.

It zips up all the files instead of the 2 they have allowed out of that album.
So my question is can it only zip up the two selected via the downloadable audio checkbox instead of the whole album ?

example page
https://www.punkbandpromotions.com/the-krayons/audio
jpg
 •  49KB




--
~ https://punkbandpromotions.com ~
Check us out for all your Punk/Alternative Music!
Check us out on Facebook:- https://facebook.com/PunkBandPromotion

updated by @madc: 06/19/14 02:36:13PM
brian
@brian
10 years ago
10,148 posts
I'm checking this out to see the best way to handle this. Unfortunately it's not something you can do via a template, so for now I would turn off album downloads.

What is the name of your custom form field for allowing/not allowing downloads? I'm assuming it is a checkbox.

Thanks!


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
MAD
MAD
@madc
10 years ago
600 posts
audio_downloadable and yes it is a checkbox
EDIT
I checked/ticked Block Album Downloads to disallow album downloads and
the button still showed and it still let me download

the code I used in the Audio/item_albums.tpl file was

{if $item.audio_downloadable == 'on'}
                    {jrAudio_download_album_button items=$_items}
{/if}

I removed that and it's hidden now
So what would I do to get the code above to only work when Block Album Downloads was unchecked?
something like?

{if $item.audio_downloadable == 'on' && $item.album_downloadable == 'on'}
                    {jrAudio_download_album_button items=$_items}
{/if}
I know thats not right
( This isn't important for now )



--
~ https://punkbandpromotions.com ~
Check us out for all your Punk/Alternative Music!
Check us out on Facebook:- https://facebook.com/PunkBandPromotion

updated by @madc: 05/15/14 08:07:36AM
brian
@brian
10 years ago
10,148 posts
When you make that change you need to reset caches so the cached profile pages are regenerated.

I've come up with an idea for a solution and will be working on it. What I want to avoid is building specific solutions for specific fields - it needs to work with all modules and fields, and events. So I'm checking that out now, but it may take a few days before something is ready.

Thanks!


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
MAD
MAD
@madc
10 years ago
600 posts
Hmmm I did that and even did a full integrity check.
Must be something at my end.

Anyway just a thought
Maybe add another checkbox saying album downloadable?
or something along those lines so it will have two variables
Downloadable ( single )
Add to Album Download

Just voicing what I am thinking


--
~ https://punkbandpromotions.com ~
Check us out for all your Punk/Alternative Music!
Check us out on Facebook:- https://facebook.com/PunkBandPromotion
brian
@brian
10 years ago
10,148 posts
MAD©:
Maybe add another checkbox saying album downloadable?
or something along those lines so it will have two variables

That's what I actually want to avoid - I don't want to start adding additional fields into any of the forms - that's what the form designer is for. "out of the box" the forms should be as minimal as they need to be, and site owners can then customize them to suit their needs - otherwise we actually make the module less flexible by forcing every site to support a base set of form fields.

So instead what I've created is a new module - "Parameter Injection" that I've just uploaded to the marketplace. This module can work hand in hand with the form designer to give you more control over how specific "views" gather and show data.

So in this instance what you want to do is:

1) Go to your marketplace and install the new Parameter Injection module (it's free).

2) Enable the module, then go to the ACP -> Parameter Injection and you should land on the Parameter Browser page.

3) Create a new parameter by selecting "Audio Support" from the List Module select, then "download_album" from the List View. Select the groups you want to apply this view to (i.e. all users), and then finally in the List Parameters textarea enter:

audio_downloadable != off

4) Save the new entry

What this will do is when the "download_album" view is loaded, that extra parameter will be "injected" into the search function that gathers the songs that are part of the album - in this case, only songs that have been specifically excluded from being downloaded will NOT be included in the album download.

Note that the download_album view is _cached_ - if you already have clicked on it for albums that contain songs that should NOT be downloaded, you can simply modify a song in the album and it will delete the existing cached download and allow it to be rebuilt again.

So check that out and let me know if that works.

Hope this helps!


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net

updated by @brian: 05/16/14 07:46:47AM
MAD
MAD
@madc
10 years ago
600 posts
Works FANTASTIC @brian!

For anyone else make sure your
System Core is min - 5.1.44
Audio Support is min - 1.4.1


--
~ https://punkbandpromotions.com ~
Check us out for all your Punk/Alternative Music!
Check us out on Facebook:- https://facebook.com/PunkBandPromotion

Tags