UTStats
Copyright (C) 2004/2005 azazel, )DoE(-AnthraX and pjmodos

This program is free software; you can redistribute and/or modify
it under the terms of the Open Unreal Mod License.
See license.txt for more information.

========
Contents
========

1. Installing the Server Actor (new and upgrade)
2. Installing the web stuff (new install)
3. Importing Logs
4. Upgrading from Beta3
5. Upgrading from Beta31
6. Known Bugs/Issues Still


======================================================
1. UTStats Actor Install Information (New and Upgrade)
======================================================

From the System folder in the zip file, copy to your UTServer\System folder the following files:

UTSAccuBeta3.u
UTStatsBeta3a.u

Remove any previous entries for UTStats and UTSAccuBeta from [Engine.GameEngine]

Add to [Engine.GameEngine] the following lines:
ServerActors=UTStatsBeta3a.UTStatsSA
ServerPackages=UTSAccuBeta3

Under the [Engine.GameInfo] check for:
bLocalLog=True or bLocalLog=False

This line HAS to be:
bLocalLog=False

Setting it to True will not give you complete logs (don't ask why it just won't).

Log files are recorded to the UTServer\Logs folder.


================================================
2. UTStats Web Install Information (New Install)
================================================

From the html folder in the zip file, upload all the files to your webserver wherever you like.
I suggest under a folder called utstats.
After the files have uploaded browse to the stats folder where you should see the following folders:

images
import
includes
logs
pages

Using whatever means (usually the ftp client) you need to CHMOD the logs folder to 777.
Now go into the logs folder.
Now CHMOD the backups folder to 777.

Now go back a level and into the includes folder.
CHMOD the file ftptimestamp.php to 777.
Now edit the config.php file.

Enter in your mysql database, hostname, username and password at the top.
If you are going to use ftp transferring of log files amend the FTP connection as required.

Now import the contents of utstats_full.sql located under the sql folder into the database you
entered into the config.php.
This will setup the following tables in your database:

uts_ip2country
uts_killsmatrix
uts_player
uts_match
uts_rank

If you wish to use the country flags option you will need to install the sql files
uts_ip2country1.sql to uts_ip2country7.sql
This MUST be done before you import your logs.

It will not drop the tables for you, it will just try to create them.
If you already have them it will fail and its up to you to drop them tables.


=================
3. Importing Logs
=================

Depending on the level of access you have and how competent you are you can do this 3 ways.
*** Important *** 
Make sure you edit config.php and set an adminkey at the top!

Way 1:
If you don't have ftp access to your UT server or allowed to use ftp via php then upload your 
logs manually to the logs folder and then run the importer via the Import link.

Way 2:
If you have ftp access and can do ftp via php, edit the config.php file and input your UT servers ftp
information into there.
Now run the importer via the Import link.

Way 3:
Automate the process using a cron job or scheduled task.
Just get this to run cd to the root of stats (where import.php is) and execute the import.php file
with php.

Way 4:
Automate the web process using a web service cron job.


=======================================================
4. UTStats Web Install Information (Upgrade from Beta3)
=======================================================

From the html folder in the zip file, upload ALL the files to your webserver overwriting your previous installtion.

Edit the config.php file.

Enter in your mysql database, hostname, username and password at the top.
If you are going to use ftp transferring of log files amend the FTP connection as required.
Set an adminkey (its no longer in the import.php file)

Now import the contents of utstats_upgrade.sql located under the sql folder into the database you
entered into the config.php.
This will add the following tables in your database:

uts_ip2country
uts_killsmatrix

It will also amend uts_player.

It is advised to empty your database and re-import your old logs as there were quite a few minor bugs in the old 
importer.  You will need to do this anyway to take advantage of the kills matrix and country flags.

If you wish to use the country flags option you will need to install the sql files
uts_ip2country1.sql to uts_ip2country7.sql (I have written this after the wipe comment above so that you wipe first, 
then add these 7 files).


========================================================
5. UTStats Web Install Information (Upgrade from Beta31)
========================================================

From the html folder in the zip file, upload ALL the files except the images folder to your webserver overwriting 
your previous installtion.

Edit the config.php file.

Enter in your mysql database, hostname, username and password at the top.
If you are going to use ftp transferring of log files amend the FTP connection as required.
Set an adminkey (its no longer in the import.php file)

It is possible you may need to empty your database and re-import your old logs for some figures to appear correctly.



====================
6. Known Bugs/Issues
====================

Logs created with the previous actor unfortunately recorded sprees and multis against the incorrect playerid.

-

Flag Assists will not show in stats until Sinister has released the next version of SmartCTF.

-

If you find any bugs or issues please post them at our forums:
http://www.unrealadmin.org/forums/forumdisplay.php?f=173