* *****************************************************************************
* WebStats 1.2.0b / Readme.txt
* Copyright (C) 2004-2005 chaoscontrol.org
* *****************************************************************************

 Contents:

	1. Introduction
	2. Requirements
	3. Installation
	4. Themes
	5. Troubleshooting


* *****************************************************************************
* 1. Introduction
* *****************************************************************************

WebStats is a basic visitor statistics program. It catches the Operating System and Web Browser type from visitors and stores the totals in a database. With this information, it allows you to display statistics in regards to who visiting your website with what.

WebStats was written 100% on open source software and is distributed under the GNU General Public License. A copy of the GPL is accompanied with this document and is also available online at http://www.gnu.org/licenses/licenses.html#GPL.

For a list of fixes and enhancements in this release, look at changelog.txt accompanied with this document.


* *****************************************************************************
* 2. Requirements
* *****************************************************************************

 - php 4.2 or greater
 - MySQL 4.x or greater (1 free or existing database)
 - Web Server (Apache Recommended)


* *****************************************************************************
* 3. Installation
* *****************************************************************************

1. Open _config/config.inc.php. You'll need to edit the appropriate section to include your MySQL username, password, etc...

2. Upload the contents of webstats_1.2.0b to your web server. If you'd like, you can create a directory to keep it's files seperate from the rest of your site.

3. Point your web browser to: http://your.site.com/<webstats_directory>/setup/

4. You should see a page that says something like "Tables created".

5. As long as there were no errors, delete the setup directory.

6. Rename the page you want the news to display on to a .php extension. For example if on index.html you want to see the stats output, rename that page to index.php -- same if the page is called stats.htm, rename it to stats.php.

Add this line where ever you want the output to be displayed: 

	<?php include("<path_to_>/webstats.inc.php"); ?>

7. On your main page of your site, you will need to add the following line to the very top of the page, before any other code:

	<?php include("<path_to_>/addstats.inc.php"); ?>

You will also need to rename the page that you added the above line to to a .php extension.

8. That should do it. If you have any problems, take a look at the troubleshooting section.


* *****************************************************************************
* 4. Themes
* *****************************************************************************

Each .tpl file in the themes directory will be echoed to the visitors browser in the following order:
	1. webstats_header.tpl
	2. os_header.tpl
	3. os_row.tpl (there will be several of these sent)
	4. os_footer.tpl
	5. web_header.tpl
	6. web_row.tpl (there will be several of these sent)
	7. web_footer.tpl
	8. webstats_footer.tpl

Each file can contain your own custom HTML/CSS/Java Script. There are also several template variables that can be used. Take a look at the default template that's included for an example of how to use them.


* *****************************************************************************
* 5. Troubleshooting
* *****************************************************************************

Getting an error: "Can't find <path_to_>/webstats.inc.php, no such file or directory.
	- Make sure your path is correct. See examples below.
		Right: include("../webstats_path/webstats.inc.php");
		Right: include("webstats_path/webstats.inc.php");
		Wrong: include("http://mysite.com/webstats_path/webstats.inc.php");

Still not working?
	
	- support@chaoscontrol.org
	- http://forums.chaoscontrol.org

