How to set the download amount of the files

Permalink
Heya, I want to transfer my old download "statistics" to the new site with the download list block, therefore I want to set the download amount of the single files.

Which could be the best way to do this? As I looked through the database I found out that every single download is listed and probably summed up in the frontend in order to show the download amount.

Thanks in advance!

Tags:

MySQL, download
bastman
View Replies: View Best Answer
bastman replied on at Permalink Reply
bastman
It's still quite a problem for me!

No ideas yet?
gour replied on at Permalink Reply
gour
Let me say that I also have a need to transfer statistics from my old WP site to the new C5 one and wonder is there any easy way how to set starting count number for specific file available for download?

Otherwise, pls. consider it as feature request. ;)


Sincerely,
Gour
bastman replied on at Permalink Reply
bastman
Yes, that's what I need. I'm not even requesting a superflawless frontend solution, anything accomplishable with PhpMyAdmin or php will do.
gour replied on at Permalink Reply
gour
I did create RFE in support Forum...let's see...
smartwebprojects replied on at Permalink Best Answer Reply 1 Attachment
smartwebprojects
The 'Downloads List' addon uses concrete5 standard way of tracking downloads.

When a download is started, concrete5 inserts an extra record to DownloadStatistics table for the file being downloaded. The number of records in the DownloadStatistics table for each file is the number of downloads displayed by the "Downloads List" for that particular file.

So, to increase the number of downloads for a certain file, the number of records in DownloadStatistics should be increased and vice versa.

I'm attaching a rather simple script which allows to delete/add records in DownloadStatistics table by setting a new number of downloads for files.

Upload 'download_amounts.php' to /tools/ folder of your concrete5 website and run the script in your browser by adding /index.php/tools/download_amounts next to your domain in the address bar, for example:
http://domain.com/index.php/tools/download_amounts......

You must be signed in as superuser (the primary admin) for access.

The script will display a table of all your files and the last column is an editable fields of the downloads counter. Change the values and submit - the script will do the database operations for you (adding fake download records if you increase the number of downloads, or deleting some if you decrease the number of downloads).

Doing a database backup before running the script is strongly recommended.

Best regards.

Denis Vlasov
Smart Web Projects
gour replied on at Permalink Reply
gour
Hello Denis,

Thank you very much for quick update.

> The 'Downloads List' addon uses concrete5 standard way of tracking downloads.

> So, to increase the number of downloads for a certain file, the number of records in DownloadStatistics should be increased and vice versa.

Do you consider that this feature request is then better targetted towards C5 core?

>I'm attaching a rather simple script which allows to delete/add records in DownloadStatistics table by setting a new number of downloads for files.

Thank you very much. It works. ;)

>The script will display a table of all your files and the last column is an editable fields of the downloads counter. Change the values and submit - the script will do the database operations for you (adding fake download records if you increase the number of downloads, or deleting some if you decrease the number of downloads).

I envision that it would be much better if the C5's File Manager would allow that...


Sincerely,
Gour
bastman replied on at Permalink Reply
bastman
Also works for me! Thanks alot.

And yes, this should really be implemented by default by either c5 or your add-on. :P
gour replied on at Permalink Reply
gour
> And yes, this should really be implemented by default by either c5 or your add-on. :P

Feel free to comment here -http://www.concrete5.org/developers/bugs/5-5-1/rfeability-to-set-ch... ;)


Sincerely,
Gour