Phoca Download ststistics module
Ответ
Task
You need a module to display total number of file downloads for Phoca Download component on your Joomla! site.
Solution
Set the DW Anything module settings as follows.
| Setting | Value | Description |
|---|---|---|
| SQL Query |
SELECT FORMAT(SUM(`hits`),0) AS `hits_total` FROM `#__phocadownload` |
Enter SQL query to retreive the total hits count from Phoca Download table.
If you want to exclude the stats for unpublished files, append
Note that you can use standard Joomla!
You can also include any MySQL data manipulation functions in your SQL query, such as |
| Header HTML |
|
You need no extra HTML code to display before the resulting list of data rows, so leave this blank |
| Template |
<p>Files downloaded {hits_total} times</p> |
Enter HTML code to display statistics data returned by SQL query. To insert data field, type it's name enclosed within curly barckets ({}) |
| Footer HTML |
You need no extra HTML code to display after the resulting list of data rows, so leave this one blank, too |
Result
You can also find the live example on our Joomla! extensions download page.



Добавить комментарий