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.
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. ;)
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.
> 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...
No ideas yet?