Using Click Counter II

From TNG_Wiki
Jump to navigation Jump to search
Ambox notice.png The Using Click Counter II is a procedure for updating your TNG Mods that allows you, the mod developer to track the downloads of your mods from the TNG Wiki on your web site Click Counter II install.
Major advantage is to allow your mods to survive your web site by keeping your mods themselves on the TNG Wiki.


Thanks to Bart 'Roebie' Degryse for providing the procedure on how you can use his Click Counter II to count your TNG Mod downloads.

This method offers the following advantages:

  • you get the click counts for the number of downloads for your mod without moving your mods to your own server
  • you can also get click counts for a group of mods
  • if your site server ever disappears, your mod doesn't get lost for the community as it remains available on the TNG Wiki server.

We will be recording TNG Wiki download activity back on the developer's website, and then serving the actual file from the TNG Wiki. Here's how we need to set it up (see the following sections for details):

  • On the TNG Wiki, upload your file and create a link to it as you always have.
  • Use your browser to find the TNG Wiki URL link to the file (details below).
  • In your website's Click Counter II admin screen enter the TNG Wiki URL address to the file you just uploaded, and note the id number assigned.
  • Back on the TNG Wiki page, replace the normal link you just created, with the link back to your website's click.php and use the correct id number in the query (argument) string.
  • Optionally add an additional link back to your Click Counter II stats routine to display your file's download stats in a new window.

To summarize: It is recommended that you upload your TNG Mods to the TNG Wiki and use Bart's Click Counter II to count your mod downloads.

Note that if you insist on hosting your own mods, then please upload a copy of your mod zip file to the TNG Wiki and update the mod article to show what its file name is as a comment below the TNGmod template to allow your mods to continue to be available, if your site should ever disappear.

It is important to download the file from the TNG Wiki because if the developer's site becomes unavailable, the TNGWiki link can be modified to point back to the local file on its own server. In other words, the file itself will not be lost. Of course the download_stats link will need to be removed because they will no longer be available.

Install Click Count

You need to install Bart's Click Counter II as documented in Click Counter II Installation on your own web site.

Note that in the settings.php
  • the $settings['webroot'] should be the same as your server's html_public or www folder.
If you are not sure what that is, it will be the same as your TNG Root Path minus the directory name where you installed TNG and the trailing slash.
  • the $settings['click_url'] should be something like

The following are the steps to take to use the Click Counter II to track your TNG Mod downloads:

Create or Update Your TNG Mod page

  • have a working Click Counter II installation on your web site
  • set up a wiki mod page with the name of the zip file for download in the TNGmod:download_link location (This is the normal way of doing things)
  • save the page so that the link is shown in red
  • click the link to get the upload page
  • upload your mod zip file
  • return to your wiki mod page and Reload the page
  • get the zip file upload location
    • in Firefox and SeaMonkey, right click the link to the zip file and choose Copy link location
    • in Chrome and Chromium, right click the link and choose Copy link address
    • in Safari, right click the link and choose Copy link
    • in other browsers. a similar capability is provided to copy link addresses

Create tracking links

  • go to the Click Counter II admin panel on your own web site
    for example,
  • create a group for your mod that covers all versions of that mod
or create the group for multiple mods in the same category, such as Media
depending on how you want to track your statistics
Create a group
  • create a new link. In link name as well as in Group you can put whatever you like, in Link URL you paste the address you copied two steps ago.
It should be something like where is the zip file for your mod
Add mod to Click Counter
  • On saving, the link you get its Click Counter address.
    it will be something like or if using a subdomain http://ccount.yourdomain/index.php?action=stats&id=1
  • You should select and Copy this link so you can paste it your TNG Mod article below
Link to use for Mod Download

Update download link and stats

  • Now go back to your wiki mod page and into edit mode.
|  download_link = for  {{Tv90}}[[|]]<hr  />for {{Tv80}}  [[||700px]]

should be replaced by something like this

|  download_link = for  {{Tv90}}[]<hr />for {{Tv80}  [[|]]
| download_stats = [ See download statistics]
  • In the TNGmod:download_link line you should now use Paste to replace the part with the Click Counter link copied above
For example, [] replaces the previous [[|]]
Note that only one bracket is now used, since the counter is on your web site and also that the pipe | is replaced with a blank.
Replace existing download link
  • In the TNGmod:download_stats line you should enter the link for the counter statistics
Note that is a new row that has been added to the TNGmod template, so you may need to add the line for
| download_stats =
For example, [http://www.yourdomain/ccount/index.php?action=stats&groupid=10 See download statistics] or if using a subdomain, [http://ccount.yourdomain/index.php?action=stats&groupid=10 See download statistics]
You can paste the same link obtained from the Click Counter II for the | download_stats = and then update the link to replace the click.php? with index.php?action=stats&
Add new download_stats row
Note that you can display statistics for each download mod as well as statistics for mods you have grouped together by updating the TNGmod template at the top of your mod as shown below:

Update TNGmod fields to count downloads and display download counts

  • Save the page.
Note that you will have to complete a captcha since you're saving a link to a place outside the TNG Wiki)

Alternate Language files

If you were using a piped display for alternate language file names, such as French language file, in order to allow for recovery of the file name if your site ever disappears, you should save the real file name as a comment below the closing brackets for the TNGmod template as shown on the right.

Alternate language file name recovery