Page 1 of 1
Direct Link for files as standard option
Posted: 11 Dec 2015, 12:24
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
Re: Direct Link for files as standard option
Posted: 12 Dec 2015, 01:42
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>
Re: Direct Link for files as standard option
Posted: 08 Jan 2016, 01:03
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)
Re: Direct Link for files as standard option
Posted: 14 Jan 2016, 23:34
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
Re: Direct Link for files as standard option
Posted: 22 Mar 2018, 10:47
by easy
Hi
I need these function too. How I can set for frontend users directlink to Yes?
E