Question on inserting new file

Phoca Download - download manager
Veritas
Phoca Member
Phoca Member
Posts: 13
Joined: 02 Feb 2018, 15:07

Question on inserting new file

Post by Veritas » 29 May 2019, 14:18

Hi everyone,
I would like to know if, through the Phoca Download settings, it is possible to automatically set the value of the "Uploaded By" field based on the user connected when a new file is inserted.
I hope I explained myself.

Thank you.

Marco

User avatar
madmetz
Phoca Member
Phoca Member
Posts: 34
Joined: 08 Apr 2019, 16:20

Re: Question on inserting new file

Post by madmetz » 29 May 2019, 15:19

Hi Marco,
Marco wrote:
...is possible to automatically set the value of the "Uploaded By" field...
I can't exactly figure out what you mean !?
In backend configuration -> components -> phoca download -> files you have a colomn named "Uploaded by".
There you can see who was the uploading user of a particular file. Do you want to see this info anywhere else?
Please tell us a bit more of your configuration, Phoca Download version, Joomla? version.

Regards Mike

Veritas
Phoca Member
Phoca Member
Posts: 13
Joined: 02 Feb 2018, 15:07

Re: Question on inserting new file

Post by Veritas » 29 May 2019, 20:46

Hello Mike,
in the backend I would like that when you insert a new file automatically the "Uploaded By" field is filled in by entering the user who has logged in.

Example: if I connect with the user Marco the "Uploaded By" field must contain the value Marco.

Joomla version 3.9.6 - Phoca download version: 3.1.9

Sorry for my bad English. :)

Thank you.
Marco

User avatar
madmetz
Phoca Member
Phoca Member
Posts: 34
Joined: 08 Apr 2019, 16:20

Re: Question on inserting new file

Post by madmetz » 29 May 2019, 21:49

Hi,

after you are logged in to your site and upload a file (and you set the correct rights for uploading files before) the "uploaded by" field should contain the firstname / name and in brackets the username. If not there's probably something wrong with your configuration!?
To set the appropriate upload rights go to: components -> phoca download -> categories.

Regards Mike

Veritas
Phoca Member
Phoca Member
Posts: 13
Joined: 02 Feb 2018, 15:07

Re: Question on inserting new file

Post by Veritas » 30 May 2019, 08:27

Hi Mike,
I am the site administrator and I have permission to upload files, I looked at the settings in components -> phoca download -> categories but I can't find anything to configure.
I probably don't understand what I have to do.
Thank you.
Marco

User avatar
madmetz
Phoca Member
Phoca Member
Posts: 34
Joined: 08 Apr 2019, 16:20

Re: Question on inserting new file

Post by madmetz » 30 May 2019, 13:48

Hi Marco,

I'll try to explain what steps are needed to make it work.

(In my case the following phoca components are installed:
com_phocadownload_v3-1-9,
plg_editors-xtd_phocadownload_v3-1-7,
plg_finder_phocadownload_v3-1-7,
plg_finder_phocadownloadcategory_v3-1-7
and plg_content_phocadownload_v3-1-7
(Some plugins need to be enabled after installation!)

1. login to your site as administrator (http...<yoursite>/administrator)
2. go to components -> phoca download -> categories
3. if there is no category click on "New" and create one
4. enter the name of your category (e.g. Images)
5. if you want to assign an icon to your category you can choose one here
6. set the appropriate rights for access, upload and delete
7. enter a short discription of what your category is used for
8. click "Save & Close"

(You will be asked to select a category in frontend before upload can start.)

Don't forget to create a menu link with: Menu Item Type = "List Of Categories (Categories View)" for your
appropriate menu - if not already done.
And don't forget to have a look at parameters in global configuration -> phoca download

The file(s) you have uploaded to your site should appear similar to this:

Image

I hope this was helpfull so far...

Regards Mike

Veritas
Phoca Member
Phoca Member
Posts: 13
Joined: 02 Feb 2018, 15:07

Re: Question on inserting new file

Post by Veritas » 30 May 2019, 14:38

Hi Mike,

Are the plugins you have installed necessary for the instructions you sent me to work?
However I had already done the steps but I didn't get the desired effect.
Maybe I'll explain myself wrongly, what I would like is for the "Uploaded By" field to be automatically filled in with the name of the user connected to the backend at that time.

I enclose a screen with the list of files and, as you can see, there is no name for the person who uploaded the file.

https://i.postimg.cc/cC1mCWX9/files.jpg

Could you possibly change the code to do what I ask?

Thanks again for your patience.

Marco

User avatar
madmetz
Phoca Member
Phoca Member
Posts: 34
Joined: 08 Apr 2019, 16:20

Re: Question on inserting new file

Post by madmetz » 30 May 2019, 16:28

Hi Marco,

not all the plugins are necessary. At least you should have installed the plg_content_phocadownload_v3-1-7 (in my oppinion).
This is needed if you want to display files or videos within articles. But it's not really necessary either.
Could you possibly change the code to do what I ask?
There is no code to change (as we think of code in program code). All we have to do is setting some parameters and/or options.

In your screenshot I could see that your access is set to public. This normally means that anyone can upload files (if so you don't have name and username to assign to a file).
So the first question is what your intention is. Either you want the 'public' to upload files or you want only logged in users to upload files.
In the latter case you have to set all rights to "Registered" and the menu item for "Upload File" has to be in the 'logged in' section of your menu structure.

Regards Mike

Veritas
Phoca Member
Phoca Member
Posts: 13
Joined: 02 Feb 2018, 15:07

Re: Question on inserting new file

Post by Veritas » 03 Jun 2019, 13:37

Hi Mike,

unfortunately I didn't solve my problem, I didn't understand what you mean by public access, I have this problem when I connect in the backend as site administrator, no user can upload files from the frontend.
Where am I wrong?

Thanks again.
Marco

Veritas
Phoca Member
Phoca Member
Posts: 13
Joined: 02 Feb 2018, 15:07

Re: Question on inserting new file

Post by Veritas » 03 Jun 2019, 14:55

Hi Mike,

now I understand, if I load documents from the frontend I see the name under "Uploaded By" so the problem is in the backend. Can anything be done to solve it? That's why I was wondering if you had to modify some piece of Phoca Download code.

For me this is a big problem, I have to remember every time I upload a file to manually enter the name of the uploader and I have to remind others too.

I hope I explained myself better this time and you can give me a solution.

Thank you.
Marco

Post Reply