Automatically bind license to user-Uploads

Phoca Download - download manager
Seppi
Phoca Newbie
Phoca Newbie
Posts: 6
Joined: 16 Jun 2009, 12:07

Automatically bind license to user-Uploads

Post by Seppi »

Hi there

Is there a way to automatically have a specific license assigned to each file, that has been uploaded by a user?

So far I seem to be only able to bind a license to a file in the BackEnd-Administration.
But might I'm missing something.


Thanks in advance
Seppi
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48595
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Automatically bind license to user-Uploads

Post by Jan »

Hi, no, for now there is no such feature :-(

Jan
If you find Phoca extensions useful, please support the project
brentwilliams2
Phoca Member
Phoca Member
Posts: 26
Joined: 23 Aug 2009, 01:22

Re: Automatically bind license to user-Uploads

Post by brentwilliams2 »

I'm sorry, but this is a feature that should be default at this point... :(

That said, I've worked out a hack. I can't guarantee it will work as intended without other consequences, so use at your own risk.

Open /views/user/view.html.php and replace all instances of "license" with "confirm_license".

Open /views/user/tmpl/default_files.php and find the <tr> that lists the license.

1) Within the input string, add the following:

Code: Select all

value="1"
(This assumes the license id is "1" in your setup)

2) For the <tr>, add:

Code: Select all

style="display:none"
That will hide the row, so the user does not change the license.

I believe those are the only changes I made to make it work. Hope that helps!
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48595
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Automatically bind license to user-Uploads

Post by Jan »

Hi, thank you for the guide.

Jan
If you find Phoca extensions useful, please support the project
Post Reply