Phoca Download ststistics module

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

Ответ

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.

Категория

Комментарии   

 
0 # PicturesGuest 16.05.2012 08:20
Hi,
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
Ответить | Ответить с цитатой | Цитировать
 
 
0 # RE: PicturesAdministrator 16.05.2012 11:43
Hi 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.
Ответить | Ответить с цитатой | Цитировать
 

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


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

SEO by Artio