Difference between revisions of "Dlstats"
From Contao Community Documentation
m |
|||
(6 intermediate revisions by one user not shown) | |||
Line 11: | Line 11: | ||
{{ExtInfo | {{ExtInfo | ||
| Dev=Glen Langer ([[User:BugBuster|BugBuster]]) | | Dev=Glen Langer ([[User:BugBuster|BugBuster]]) | ||
− | | DevSite=http://contao. | + | | DevSite=http://contao.ninja |
− | | ExtVersion=2.1.0 | + | | ExtVersion=2.4.1 / 3.4.0 |
| Version=from 2.9 | | Version=from 2.9 | ||
| TLVersion=2.7.6 - 2.8.4 | | TLVersion=2.7.6 - 2.8.4 | ||
Line 28: | Line 28: | ||
==Using== | ==Using== | ||
Go to the Contao Settings and switch on the logging, either only counting the number of downloads per file, or optionally also log each download with timestamp and IP.<br /> | Go to the Contao Settings and switch on the logging, either only counting the number of downloads per file, or optionally also log each download with timestamp and IP.<br /> | ||
− | In the settings you can be deactivated the Anonymize IP function, it must be the admin.<br /> | + | '''For dlstats 2.1.x:''' In the settings you can be deactivated the Anonymize IP function, it must be the admin.<br /> |
+ | '''From dlstats 2.2.0:''' IP addresses anonymous: "yes/no" is now controlled by Contao itself.<br /> | ||
+ | (System - Settings - Privacy settings - Anonymize IP addresses)<br /><br /> | ||
Use the content element File Download or File Downloads for all downloaded files you want to have counted.<br /> | Use the content element File Download or File Downloads for all downloaded files you want to have counted.<br /> | ||
After downloading a file you will find the statistics under Content - Download Stats. | After downloading a file you will find the statistics under Content - Download Stats. | ||
Line 60: | Line 62: | ||
---- | ---- | ||
− | --[[User:BugBuster|BugBuster]] | + | --[[User:BugBuster|BugBuster]] 20:07, 1 April 2013 (CEST) |
Latest revision as of 20:23, 19 June 2016
I'm not a native English speaker. Please correct my mistakes.
Counts the number of file downloads
- Download statistics for the standard content elements Download and Downloads
- Count number of downloads per file plus latest download timestamp
- Optionally log every single download with timestamp, IP and username.
- Insert-Tag for number of downloads in the frontend (from 2.1.0)
- Ignore certain IPs (define itself, from 2.1.0)
Extension-Overview | |
---|---|
Name of the developer | Glen Langer (BugBuster) |
Developer Website | http://contao.ninja |
Version of the extension | 2.4.1 / 3.4.0 |
Compatibility with Contao Version | from 2.9 |
Compatibility with TYPOlight Version | 2.7.6 - 2.8.4 |
Link to Extension Repository | http://www.contao.org/extension-list/view/dlstats.en.html |
Link to Tracker | https://github.com/BugBuster1701/dlstats/issues |
Depending of ff. Extension | Bot Detection |
Installation
The installation of the module occurs about the extension Repository in back end of Contao. On manual installation, call /contao/install.php - Perform Update Database.
For manual installation, please note that the module "Bot Detection" must be installed.
Using
Go to the Contao Settings and switch on the logging, either only counting the number of downloads per file, or optionally also log each download with timestamp and IP.
For dlstats 2.1.x: In the settings you can be deactivated the Anonymize IP function, it must be the admin.
From dlstats 2.2.0: IP addresses anonymous: "yes/no" is now controlled by Contao itself.
(System - Settings - Privacy settings - Anonymize IP addresses)
Use the content element File Download or File Downloads for all downloaded files you want to have counted.
After downloading a file you will find the statistics under Content - Download Stats.
Using Insert-Tag
The Insert-Tag "cache_dlstats::total downloads::..." supports both, the source of the file (relative path + file name), as well as in connection with the article alias and how it generates for ce_download and ce_downloads. Therefore, the use is well used in the templates of the two CEs, see examples. Return is only the number of downloads as a number.
{{cache_dlstats::totaldownloads::tl_files/cdc2010.pdf}} {{cache_dlstats::totaldownloads::CDC_2010.html?file=tl_files/cdc2010.pdf}} // in ce_download template: {{cache_dlstats::totaldownloads::<?php echo $this->href; ?>}} // in ce_downloads template: {{cache_dlstats::totaldownloads::<?php echo $file['href']; ?>}}
Ignore certain IPs
If any downloads from certain IP addresses should not be counted, this can be defined in the localconfig.php as follows:
$GLOBALS['DLSTATS']['BOT_IPV4'][] = '192.168.1.2'; $GLOBALS['DLSTATS']['BOT_IPV4'][] = '192.168.0.0/24'; //respectively $GLOBALS['DLSTATS']['BOT_IPV6'][] = '2001:0db8::1'; $GLOBALS['DLSTATS']['BOT_IPV6'][] = '2001:0db8:85a3:0800::/56';
Notice
- Simple links to files will not be counted as downloads!
- If you are logged in the backend, your download is not counted. (from 2.1.0)
--BugBuster 20:07, 1 April 2013 (CEST)