Customize Upload layer

Phoca Download - download manager
tintilld
Phoca Newbie
Phoca Newbie
Posts: 6
Joined: 19 Apr 2020, 21:15

Customize Upload layer

Post by tintilld »

Hello,

I would like to configure the "User Upload" layer in order to:
- Delete / Hide some fields (File title, descritpions, Author, ...)
- Generate the name of the file on the basis of usernam_YYYY-MM-DD_HH-MM.ext (ext is the extension of the uploaded file)

How can you do this easily?

If this is not possible with Phoca download, what can I use instead?

Thank you in advance for your help

kind regards
Tintilld.
christine
Phoca Hero
Phoca Hero
Posts: 2857
Joined: 28 Nov 2010, 17:20

Re: Customize Upload layer

Post by christine »

Hi,
tintilld wrote: 02 May 2020, 18:25 I would like to configure the "User Upload" layer in order to:
- Delete / Hide some fields (File title, descritpions, Author, ...)
You could try this with an template override of: components\com_phocadownload\site\views\user\tmpl\default_files.php

See similar Thread here: viewtopic.php?f=31&p=155995#p155995
Maybe the lines could be different.

Kind regards
Christine
tintilld
Phoca Newbie
Phoca Newbie
Posts: 6
Joined: 19 Apr 2020, 21:15

Re: Customize Upload layer

Post by tintilld »

Many Thanks Christine.
As always, you help us when we have a difficulty :)

I successfully delete line that I want :)

Users have just one category to Upload
How can I fix the category for don't ask user?

Another question, what is the name of the variable which contain the UserName ?

Sorry for my very bad english

Thanks by advance for your help.
Tintilld.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48550
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Customize Upload layer

Post by Jan »

Hi, user name are mostly stored in variables like $user, or $u, or $this->u, etc.

one category - in such case the select box needs to be changed and the one category set as only one item in the select box list.

Generating name should be changed in upload class:
administrator\components\com_phocadownload\libraries\phocadownload\file\fileupload.php

Jan
If you find Phoca extensions useful, please support the project
tintilld
Phoca Newbie
Phoca Newbie
Posts: 6
Joined: 19 Apr 2020, 21:15

Re: Customize Upload layer

Post by tintilld »

Hi Jan,

Many thanks for your answer :)
I find the username in this variables ==> $user->get('name', 0)

I could fix the filesnames too :)

But I didn't find how resolve my last difficulty :
one category - in such case the select box needs to be changed and the one category set as only one item in the select box list.
How can I do it?

Tintilld.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48550
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Customize Upload layer

Post by Jan »

You need to write own select box in the override file - including the category id, which you need to display. Just see the source html code of the select box, copy it, change it to your needs and paste to the file which overrides the output.

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