Click Counter III

From TNG_Wiki
Jump to navigation Jump to search
Restricted Downloads of Click Counter III are restricted to logged in users. If you do not have a user account on the TNG Wiki use the Request Account link to request a user account Restricted
Caution If you have trouble downloading with Google Chrome, Vivaldi, Brave or other Chromium based browser, try using a right-click and select Open in new Window, then F5, or use another browser such as Firefox


Caution


Click Counter III
Summary Standalone drop-in program
Validation The addon is XHTML compliant.Valid-xhtml10.png
Mod Updated 31 May 2019
Download link
version 3.0
TNG All
Download stats View download statistics
Author(s) Bart 'Roebie' Degryse (no longer online)
Maintained by Rick Bisbee and the TNG Users group
Homepage Click Counter III
Mod Support Support for Click_Counter_III
Contact Developer As above
Latest Mod 3.0
Min TNG V n/a
Max TNG V m/a
Files modified
Related Mods
Notes


Counting sessions.jpg

Program Description

Click Counter is a copyrighted, standalone program written by Bart "Roebie" Degryse to detect and save the number of hits on selected website links. TNG mod developers have used it for years to track the number of times their mods are downloaded. The idea is to prioritize maintenance efforts against those mods that are most widely used.

Sadly, Bart suffered a tragic accident several years ago and no longer has an Internet presence. His original program cannot be downloaded from his now-defunct website anymore.

TNG mod developers began offering mods for Click Counter to add additional features like 1) optionally restrict downloads from the TNGWiki to users logged into their wiki accounts, 2) send email notification to the mod developer when one of their mods is downloaded and 3) optionally include geo-location information about the download.

Bart's Click Counter and these mods have been very popular. However, mods are inherently kludgy -- often axes where scalpels are needed. To repair and maintain them, someone has take the time to study the original Click Counter program, understand how the mod code works and then devote considerable time to get everything running correctly again.

Click Counter III integrates the best of the Click Counter II mods into Bart's original program to make it more efficient, bug-free and maintainable going forward. Click Counter III is independent of TNG -- it can be run without even having TNG installed. TNG upgrades should not require revision to Click Counter III.

Please note that Bart Degryse's copyright still covers all versions of Click Counter, including this one. Take time to read it carefully. Our hope is that Bart recovers from his injuries soon and returns to the TNG community.

Feature List

  • Count all hits or unique hits
  • Works for regular links as well as download links
  • Password protected admin panel
  • Links can be grouped
  • Statistics per group, per link, per selection of groups or per selection of links
  • Inline statistics
  • Graphical display of number of downloads
  • Database can be stored outside the webroot
  • Downloadable files can be stored outside the webroot
  • Downloads can optionally send email notification to mod developer(s) Redcheck.png new
  • Download links can add cc addresses to email notification Redcheck.png new
  • Email configuration file can be stored outside the webroot Redcheck.png new
  • Email can use TNG config.php file for email configuration Redcheck.png new
  • Email notifications can optionally provide geo-location of download Redcheck.png new
  • Extensive documentation
  • Some of the core files can be shared between Click Counter III instances

Requirements

  • A working web server with PHP 5.5 or higher
  • Enough patience to read the manual.

Readme.gif

New Installation

  1. Download the Click Counter III zip file as shown in the summary in the upper right corner of the page.
  2. Extract the 'ccount' folder from the download zip file to your desktop.
  3. Change the name of the folder if you want it named differently.
  4. Inside the folder, click on readme.htm to display the manual in your default browser.
  5. Edit settings.php and enter values applicable to your website. See the table below. You can also consult the installation chapter in the manual on how to do this.
  6. Upload the click count folder to your website where it can be accessed with a URL.
  7. If you already have a Click Counter database (ccount.db) from a previous installation, copy it into this folder.
  8. If your settings are correct, you can start using Click Counter III by navigating your browser to the Click Count folder, for example, https://www.example.com/ccount
  9. If you get errors or a white screen, go back to your settings, read the applicable area of the manual and make sure you have set them correctly.
  10. Read 'Using Click Counter III' and 'Counting downloads' chapters of the manual for how to use it.

Upgrading to Click Counter III

  1. Use your Click Counter Control Panel to save a copy of your database to your desktop or to another safe location.
  2. Uninstall your Mod Manager mods for Click Counter II.
  3. Rename your website's current Click Counter folder to protect its contents.
  4. Follow the Installation instructions above to add a new Click Counter III folder to your website.
  5. Copy your database backup file (ccount.db) to your new Click Count III folder, overwriting the empty file there.
  6. Do not copy your old settings.php file because the new settings may be different and will likely cause errors or a white screen. Instead, open them side by side and copy your old settings values to the new settings.php file.
  7. After Click Counter III is up and running you can delete your old CC II folder if you want.

Tip: If you store your database file (ccount.db) outside your Click Counter III folder, it will be protected from being overwritten in future upgrades. Just be sure to point $settings['database'] to its new location.

Click Counter III Setup Parameters

Setting up Click Counter III is as easy as editing the settings.php file in your Click Counter III folder — 'ccount' if you have not renamed it. Here are the parameters you need to set:

Variable Value
$settings['apass'] Password to use for entry into the Click Counter III admin panel. Initial password is set to 'admin', but it should be changed at your first opportunity.
$settings['apass']="myDogBoo2";
$settings['click_url'] The URL to the Click Counter III click.php file. For example,
$settings['click_url']="https://www.example.com/ccount/click.php";
$settings['click_url']="count.example.com/click.php";
$settings['count_unique'] Count only unique clicks during a period of time set below. A value of 1=YES, 0=NO. To only count unique clicks:
$settings['count_unique']=1;
$settings['unique_hours'] If count_unique is set to "1", the period of time in hours during which to only count multiple downloads as one. If the $settings['count_unique'] is set to "0" all downloads will advance the click counter by one each time. To only count unique clicks with a 24-hour period:
$settings['unique_hours']=24;
$settings['webroot'] Enter the server path to your website root directory, for example:
$settings['webroot']="/home/user/public_html/tng/";
Note the trailing forward slash.

Settings that may be left as they are

$settings['database'] The path to your click counter database (ccount.db). This value is preset; you will only need to change it if you move your database, for example, to a folder outside public access to the website.
$settings['database']="ccount.db";
$settings['accessor'] The path to your click counter database interface. This value is preset; you will only need to change it if you move the interface, for example, to a folder that will be shared with other instances of Click Counter III.
$settings['simpleDBAccessorSQLite.php']="simpleDBAccessorSQLite.php";
$settings['downloadlib'] The path to your click counter download library. This value is preset; you will only need to change it if you move the library, for example, to a folder that will be shared with other instances of Click Counter III.
$settings['downloadlib']="downloadlib.php";

Required for email notifications

$settings['sendmail'] Set this to "1" for email notifications; "0" and no emails will be sent.
$settings['sendmail']=1;
$settings['mailconfig'] Sets the path to your email configuration file for SMTP support. This may not be left empty. You may set a path to your TNG config.php file and Click Counter III will use the SMTP values found there. Click Counter III comes with a mailconfig.php file that you may fill in an use instead.
$settings['mailconfig']="../config.php";
$settings['mailconfig']="/home/user/config.php";
$settings['mailconfig']="mailconfig.php";
$mail_to Set this to the email address(es) you want your notifications to go to. Multiple addresses can be put on one line, separated by commas.
$mailto="admin@example.com";
$mailto="downloads@example.com,admin@example2.com";
$mail_from Set this to the email address you want your notifications to come from if you are not using SMTP. SMTP mail will use the email account identified in the mail configuration file. $mail_from should be a valid email address on your website.
$mailto="webmaster@example.com";
$settings['ipinfo'] Set this to "1" to include geo-location of download in notifications. If "0", no geo-location information is included.
$settings['ipinfo']=1;
$settings['restricted'] Set this to "1" to require a user id be sent with the download request. TNGWiki uses this to determine if the user is logged into TNGWiki when making the request.

Click Counter III download links can be set to ignore this restriction in the admin panel. So you can restrict all, but allow some to be downloaded without a user id.

$settings['restricted']=1;

Screenshots

Click Counter III screenshot of a group of links This image shows the Compact Person Media group. In this group are the three zip files that have been made available so far. You can see how many times each version has been downloaded, when they were added and what their unique id is. You also see the X, O and E buttons for deleting, reseting and editing each link.
To add a new link you have to provide a name and an url for the link. If you want you can also choose the group from the dropdown list. As you can see there is also extra information on each form field. Click Counter III adding a link
Click Counter III link statistics The Click Counter II admin panel also provides some statistics on the links you've created: their number, the total number of clicks, the avarage per link and the link with the most clicks.
Adding a new group with the Click Counter II admin panel is as easy as can be: just provide a group name. Click Counter III adding a group
Click Counter III group statistics The group statistics list all existing groups, their unique id and the number of links in each group. You also see the X and E buttons for deleting and editing each link.
Click Counter III backup and restore
Click Counter III statistics per group Click Counter III can show you statistics per group     
or you can show several groups at once. Click Counter III statistics multiple groups
Click Counter III statistics per link And the same for the individual links: statistics per link...
or statistics for a selection of links, even from multiple groups. Click Counter III statistics multiple links
Click Counter III inline statistics And finally you can have inline statistics.

Revision History

Version Release Date Contents
v3.0 28 Aug 2020 Initial release

Sites Using This Add-on

Please add your site to the table if you use this modification.

URL User Note Mod-Version TNG-Version User-language
A Bisbee Family History Rick Bisbee A must-have for mod developers v3.0 12.3 English
Our Roy and Boucher Families Ken Roy Worked with Rick Bisbee to test this replacement of Bart's Click Counter II and Jeff Robison Click Counter II Email Notify v3.0 12.3 English, French