Welcome to Download Counters wiki page!
There cannot be anything easier then using DownloadCounters...almost
Firstly what you have to do is place in your project dir a XML file descriptor with name "counter.xml".
Then you have to write it's content in appropriate style. Here you can see an example of a simple "counter.xml" file:
<counters sorting="DESCENDING" > <counter> <link visible="true/false" > /default/members/jbosswiki/downloads/wikiClassDiagram.png </link> </counter> <counter> <link> /default/members/jbosswiki/downloads/SHOWPAGEdiagram.png </link> </counter> </counters>
In the XML you give the paths to the files of which downloads you want to track.
The way of creating the paths to the files is simple too:
Please don't forget about beginning slash!
Additionally, you can set the sorting order of your counters. It can be defined by "sorting" attribute as you can see above in the example. The possible values for this attribute are:
ASCENDING or ASC - to sort counters in ascending order of counters' values
DESCENDING or DESC - to sort counter in descending order of counters' values
RANDOM - counters will be displayed in non-defined order. This is the default value if you don't specify this attribute
Moreover, each link tag may have it's visibility attribute. This gives you the possibility to hide or show counters without stopping them from counting even if they are invisible. As you can see in above example the attribute for this is "visible" and the possible values are "TRUE"(default one) or "FALSE".
That is all you have to do :). Now move to the downloads page of your project and watch how the counters increment :D.
In case you would like to turn off tracking of one of the files or all of them simply delete the appropriate path from the XML or the XML itself.
If there would be any problem or question about DownloadCounters don't hesitate to write to me.