Downloads count - 'hits'

Phoca Download - download manager
konoshchenko
Phoca Newbie
Phoca Newbie
Posts: 2
Joined: 02 Jul 2011, 17:05

Downloads count - 'hits'

Post 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!
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48595
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Downloads count - 'hits'

Post 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
If you find Phoca extensions useful, please support the project
Post Reply