Direct Link for files as standard option

Phoca Download - download manager
chatix
Phoca Newbie
Phoca Newbie
Posts: 2
Joined: 19 May 2015, 17:17

Direct Link for files as standard option

Post by chatix »

Hi,

is it possible to set the Direct Link option to Yes as standard? I want to set it on every new file and allow frontend users this too.

Thx.

Michael
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 47870
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Direct Link for files as standard option

Post by Jan »

Hi, this needs to be set directly in the code, see:

administrator\components\com_phocadownload\models\forms\phocadownloadfile.xml

Set default to 1 in:

Code: Select all

<field name="directlink" type="list" label="COM_PHOCADOWNLOAD_FIELD_DIRECT_LINK_LABEL" default="0"  description="COM_PHOCADOWNLOAD_FIELD_DIRECT_LINK_DESC" class="inputbox"  >
	<option value="1">COM_PHOCADOWNLOAD_YES</option>
	<option	value="0">COM_PHOCADOWNLOAD_NO</option>
</field>
If you find Phoca extensions useful, please support the project
folkert050
Phoca Newbie
Phoca Newbie
Posts: 1
Joined: 08 Jan 2016, 00:55

Re: Direct Link for files as standard option

Post by folkert050 »

Thanks Jan, I also have got same wish as Michael, so I have adjusted the default in de code (in administrator\components\com_phocadownload\models\forms\phocadownloadfile.xml)
This is sufficient for files uploaded by the adminstrator/backend, but
still while uploading documents via the front-end, the DirectLink parameter is set to 'N' after uploading a new document.
Is there some other 'hidden' code to be adjusted?
thanks in advance
Folkert Alberts (Netherlands)
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 47870
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Direct Link for files as standard option

Post by Jan »

Hi, this is setting for backend only. In frontend, a new form field needs to be done or the value should be directly set in code - in controller or model of the user view:
see save function:
components\com_phocadownload\models\user.php

Jan
If you find Phoca extensions useful, please support the project
easy
Phoca Newbie
Phoca Newbie
Posts: 5
Joined: 07 Jun 2014, 19:11

Re: Direct Link for files as standard option

Post by easy »

Hi
I need these function too. How I can set for frontend users directlink to Yes?
E
Post Reply