Download date

Phoca Download - download manager
effettoMapet
Phoca Newbie
Phoca Newbie
Posts: 4
Joined: 20 Jan 2024, 22:10

Download date

Post by effettoMapet »

Hello everyone and thanks for your help!

I need to insert the date and maybe even the time of each individual download in the download list tab (component > Phoca Download > Download).

What can I do to get this date?
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 47887
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Download date

Post by Jan »

Hi, sorry I don't understand? You want to add the date or get it?

Jan
If you find Phoca extensions useful, please support the project
effettoMapet
Phoca Newbie
Phoca Newbie
Posts: 4
Joined: 20 Jan 2024, 22:10

Re: Download date

Post by effettoMapet »

Hi, I want to add the date on which each individual download was performed.

So in (component > Phoca Download > Download)

I want to have:
- User
- Files
- Download date
- ID

Thanks for your patience.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 47887
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Download date

Post by Jan »

Hi, for now, the system does not store the date as it can counts more download from one users in time. So it just counts user downloads, not the date of the download.

Jan
If you find Phoca extensions useful, please support the project
effettoMapet
Phoca Newbie
Phoca Newbie
Posts: 4
Joined: 20 Jan 2024, 22:10

Re: Download date

Post by effettoMapet »

HI
And what if you want to display only the data of the latest download for each user?
Could I do it somehow by adding code with your help?

Thank you
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 47887
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Download date

Post by Jan »

Hi, there is a database table jos_phocadownload_user_stat where the downloads for each users are stored, but not each download, only downloads per file. This means, if user download some file e.g. File A twice, you have a record which says, that there are two downloads of File A by the user, but you don't have date for each download stored, only the last download date for each file and user.

Image

So not sure, if this can help you for 100%. You can list download for each users, you can list them by date, but you cannot somehow manage, when there were two download for one file.

Jan
If you find Phoca extensions useful, please support the project
effettoMapet
Phoca Newbie
Phoca Newbie
Posts: 4
Joined: 20 Jan 2024, 22:10

Re: Download date

Post by effettoMapet »

Gen you are very kind!
So if I understand correctly, if the example user Pablo downloads file A twice and file B once, the database shows the date of file B and the last date of file A. Right?

If that were the case it would already be fine with me.
In this case, how could I enrich the code to read this value and add it to the control panel?

Thank you very much for your patience
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 47887
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Download date

Post by Jan »

Hi, unfortunately, this all needs to be customized - from asking database for data to manipulating them and rendering them in php. :idea:

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