Page 1 of 1

Downloads count - 'hits'

Posted: 02 Aug 2012, 15:55
by konoshchenko
Hi,

Please assist me with the following problem.
I have a bonus program which can be increased when the user uploads something to the server.
This bonus should be also decreased during downloading.
I know that PhocaDownlaod has 'hits' record which contains the number of downloads.

When the user clicks at the "Download" button this record increases automatically +1.
How Can I track this to put my code with bonus?

I was not able to find the place where the hits goes up +1, during clicking 'Download"

Can you assist?
Thanks a lot!

Re: Downloads count - 'hits'

Posted: 11 Aug 2012, 17:17
by Jan
Hi, there is an help table for this, just see the helper class in the frontend, there is a download method to handle it.

class PhocaDownloadHelperFront
components\com_phocadownload\helpers\phocadownload.php

Code: Select all

// USER Statistics
					if ((int)$params->get('enable_user_statistics', 1) == 1) {
						$addUserStat = PhocaUserStatHelper::createUserStatEntry($downloadId);
					}
Jan