News:

Dear forum visitors, if the support forum is not available, please try again a few minutes later. Thanks!

Main Menu
Support-Forum

Multiple downloads with one file - semi-working

Started by Lena, 01.09.2016 13:52:30

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Lena

I have a main category with some sub-categories.

Main-Cat
-   Sub1
-   Sub2
-   Sub3
-   ...

Then there are user-groups for each sub-category.

-   GroupSub1
-   GroupSub2
-   GroupSub3
-   ...

And these user-groups are connected to access/view permissions for each sub-category.
The access/view-permissions have a parent which is connected to the main-cat.
The goal is that every user only has access/and sees the sub-categories he is a group-member of.

This setup works.

Now the exception:
UserSub1 is a member of GroupSub1 and has access to Sub1.
UserSub1 needs to access a file which is located in Sub2. I located the download and made a copy and manually linked the file in the folder Sub2 to it. After changing the access-level of the original download to the main-cat it seemed to work. Sub1 sees the download and can click on the button download and the file is loaded (direct download activated). BUT the web player (mp3 file) isn't displayed and a download with checkboxes won't work.

Can this setup with the exception work? If so, where is my mistake?

I don't want to use duplicate files and the users aren't allowed see all files in the other categories.
I hope you understand my setup...

With kind regards
Lena

P.S. Joomla and JDownloads are up-to-date.
P.S. Another hint. The download is shown in the protocols. But it has 0KB.
  •  

Lena

I figured out why there are 0KB. That is solved. Nevertheless, no zip files and no audio player.
  •  

Arno

QuoteI located the download and made a copy and manually linked the file in the folder Sub2 to it.
I understand not exactly what  you have done here.  ::)

Basically it is possible to select a file from another 'Download' (see pic) but i'm not sure that this works when the user has different download rights.

So it could be that you must in this case really copy the file. 

[gelöscht durch Administrator]
Best Regards / Gruß
Arno
Please make a Donation for jDownloads and/or write a review on the Joomla! Extensions directory!
  •  

Lena

Yeah... in short I did the exact same thing you described. The Download-Button works. The file is loaded. But the web player for the audio file isn't displayed and the zip function with the checkboxes won't work...
  •  

ColinM

Hi
Another way of solving this should be possible through permissions and view access levels.
Presently you have a nice totally separate set of user groups and sub cats.  Now you want to allow some Downloads to be 'shared'.  So create a sub cat called say Shared1and2.  Obviously put the shared Download in this sub cat.  Then create a view Access level that contains UG1 and UG2 and apply that to Shared1and2.  Also set the permissions on that sub cat so that both UG1 and UG2 may Download

Suggest you look at the 'multi-department' section at end of
http://www.jdownloads.net/documentations/item/controlled-access-to-categories-and-downloads

Colin
PS on your present setup where you 'point' to another file you need to add the preview file to both Downloads.
Colin M
  •  

Lena

Hi Colin,

basically the suggestion with a shared subcat is a great idea. Thank you! I'll have to think a bit longer about how to implement it for "the long run".

As for the preview file: The "Original-Download" is a audio file. It was created automatically and I didn't need to specify a preview file for the player in the checkbox layout.
For the duplicate download pointed to the file of the original download I can only upload a preview file... this leaves me (again) with to identical files, which I want to prevent due to disk space...
Is it possible to use an existing file on the server as a preview?


The zip-function is a little mystery... it works with some downloads, which are pointed to other files, and with others it won't... I'll need to debug and have a look download by download...

And for quite some time generated zip-files won't delete themselves after the specified time (configuration) is up.
  •  

ColinM

Lena
QuoteAs for the preview file: The "Original-Download" is a audio file. It was created automatically and I didn't need to specify a preview file for the player in the checkbox layout.
Hmm!  Do not think there is presently a link to another preview file.

QuoteAnd for quite some time generated zip-files won't delete themselves after the specified time (configuration) is up.
There is no precise timer.  Basically it is checked when jDownloads 'runs' and it checks to see if the minimum time has expired. But I have not looked at for a long, long time so I cannot recall precisely which event causes the search.

Colin
Colin M
  •  

Lena

Hi Colin,

one last thing. I put some thought into the downloads layout. Previously I just the tag {preview_player} to display die audio player for the download files. It works fine. I switched to the tag {mp3_player}. Also working.

Now on to the duplicate download for another category:
I duplicate the download and select the mp3 file in the other category/folder. The download "seems" to work. The user can download the file by clicking the download button. But the audio player isn't displayed.
The source code (td) is empty.
Could it just be that it isn't a permission problem? That the audio player can't "put together" the path to the file like the download button can?

I'm no expert in programming like you guys... just a thought into another direction... nothing else makes sense to me...

Lena
  •  

ColinM

#8
Hi
I will get back to you on these. Only have a slow tablet with me.
{mp3_player} and {preview_player} are treated identically. mp3_player was the originl macro but as jD supports several video and audio formats then preview_player is the preferred usage. Technically mp3_player is simply retained for compatibility with older usage.
Colin
Colin M
  •  

ColinM

Lena

QuoteI duplicate the download and select the mp3 file in the other category/folder. The download "seems" to work. The user can download the file by clicking the download button. But the audio player isn't displayed.
When you were creating a 'duplicate' in the Files Tab of the create a new Download I suspect you used the "Alternatively" field which Allows you to select a file so that it can be included in multiple Downloads.  This would then make the file downloadable from either of the two Downloads.

When you loaded the file initially directly from your browser, if the config parameters are set up appropriately, then it will automatically create a preview and attach it to the Download.  This does not happen when yo just link to an already existing file.

What you are asking for is that jD should allow you to directly link to an existing preview, or even better to use the file as its own preview.

At present if you have an Audio or a Video file in a Download and request that the file is also used as a preview then jD actually copies the file into the _preview folder. That is there a 2 copies of the file.  The original intent was that the preview was a much shorter example.  This originated when disk space was at a 'premium' and audio/video payers were not so good as they are now.

It would be quite feasible to have for a Download the option to request that the main file is itself the preview.  The same could then extend to the 'duplicate'.
Implementing this would mean a significant amount of re-coding and checking.

An interim step could be to allow selection of the preview from an existing preview rather than uploading yet another copy.
Need to discuss with Arno.

Colin

Colin M
  •  

Arno

Quote
An interim step could be to allow selection of the preview from an existing preview rather than uploading yet another copy.
Need to discuss with Arno.
I think this could be the easiest solution.
Best Regards / Gruß
Arno
Please make a Donation for jDownloads and/or write a review on the Joomla! Extensions directory!
  •  

Lena

I had to read your replies a couple of times to fully understand them (late friday night...), but now I'm getting it  ;)

I'm looking forward to any solution you might have.  :D
  •  

Lena

Hi Arno,

you and Colin mentioned that you wrote some code in the update (3.2.46) for this matter. I couldn't find anaything in the release notes and after doing the update the player is still not displayed in the duplicate download.
What's the status there?

Edit:

Or am I missing something? I'm still using my "old" layouts...
  •