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.
Комментарии
In my database i have some records with a number like 5356.
When showing the data i like to see the picture, wich is in a folder, 5356.jpg
Is this possible?
Ken
Yes, it is possible.
Add the image tag to your template:
<img src="/images/pa th/{id}.jpg" />
given that your image number is stored as an id column.
RSS лента комментариев этой записи