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
Automatically bind license to user-Uploads
-
- Phoca Newbie
- Posts: 6
- Joined: 16 Jun 2009, 12:07
- Jan
- Phoca Hero
- Posts: 48595
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Automatically bind license to user-Uploads
Hi, no, for now there is no such feature 
Jan

Jan
If you find Phoca extensions useful, please support the project
-
- Phoca Member
- Posts: 26
- Joined: 23 Aug 2009, 01:22
Re: Automatically bind license to user-Uploads
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:
(This assumes the license id is "1" in your setup)
2) For the <tr>, add:
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!

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"
2) For the <tr>, add:
Code: Select all
style="display:none"
I believe those are the only changes I made to make it work. Hope that helps!
- Jan
- Phoca Hero
- Posts: 48595
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Automatically bind license to user-Uploads
Hi, thank you for the guide.
Jan
Jan
If you find Phoca extensions useful, please support the project