Phoca Download ststistics module

Дата добавления:
04.09.2010
Хиты:
923
Рейтинг:
 
Голосовать:
Хорошо - Плохо

Ответ

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 WHERE `published` = '1' condition to the SQL string.

Note that you can use standard Joomla! #_ prefix for database table names.

You can also include any MySQL data manipulation functions in your SQL query, such as FORMAT() in this example

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

Files downloaded 11,258 times

You can also find the live example on our Joomla! extensions download page.

Категория

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


Защитный код
Обновить

SEO by Artio