Configuration

The script has been configured in a way that makes it ready to use. You only need to upload all script files to your web server. You can call the script directly in your browser or can include it into an existing page. Further information about including the script can be found in chapter "Including the script".

When you edit the script you should do it step by step. After each change you should run the script to monitor the effects. Doing so enables you to know what change eventually causes an error.

The file index.php can be viewed as the configuration file for the script. It is possible to duplicate the file and set it up in a different manner. That enables you to run several counters with the same script core.

The following variables can be edited:

$language

You can set here the language. Enter here the abbreviation that also is used in the name of the language file in the directory "languages" (en in languages.en.inc.php and de in languages.de.inc.php).

$log_referers

With this variable you can decide, whether extern referring pages are logged. If you use this feature, please make sure that the directory "logfiles" and the file "referer.txt" have writing permissions (chmod 777).

$count_visitors

With this variable you can decide, whether the page visits are counted. If you use this feature, please make sure that the directory "logfiles" and the file "referer.txt" have writing permissions (chmod 777).

$display_errors

The default value of this variable is "yes" so during the configuration process you will get error messages and hints that help you to install the script. Once the script configuration have been finished you can set off these system messages because it is not necessary to give extern visitors a view in the system.

$script_root

Enter here the server path to the script. The path can be relative (./counter_script/ or counter_script/). It can also be absolute (/usr/local/etc/httpd/.../counter_script/). Please be sure to include the ending slash.

$path['templates']

This file contains the path to the directory where the HTML template are stored.

$path['logfiles']

This file contains the path to the directory where the log files are stored.

$temp['template']

This variable contains the file name of the HTML template.

$file['referer']

This variable contains the name of the file where the referers are logged.

$file['count']

This is the name of the file, where the downloads are counted.

$add_text

You can add further values, text, variables or other content to this variable. That content can be displayed in the HTML templates by using markers/placeholders within curly brackets { and }.

If you want to add your own values to the variable $add_text please follow the pattern from the example entries.

$add_text = array(
     'txt_additional' => 'Additional',
     'txt_more' => 'More'
     );

The first part of each entry is the name of the placeholder. In case you want to use the value of txt_addition in your template enter the name of the entry with curly brackets - {txt_addition}. The name must not contain white spaces or special characters. Only allowed is the _ .