FOF 2004 Parser, v1.1
by Dave Mattingly
Last updated, 12/5/03

Table of Contents
-----------------
1. Use Agreement
2. Basic Outline of Features
3. Installation
4. Setting up Text Files
5. Outputting into HTML
6. Version updates

1. Use Agreement
----------------

This software is freeware, and is provided as is.  The author wishes no more compensation for this product than your feedback on the current system and any features you'd like to see included in future versions.

The most recent version of this system will be available at http://www.tredsoft.com/FOFParse.zip, and notices of new features will be placed at FOFC.

Questions, comments, and suggestions can be sent to dave@tredsoft.com.

2. Basic Outline of Features
----------------------------

This product is geared at fellow Commissioners and Webmasters of online leagues, playing FOF 2004.  The game currently does not provide any way to outport statistics from the game to an HTML page.

One could manually create a page every time you ran a game, but, hey, we're smarter than that.  With this system, all you will have to do to update your pages is upload the new text output from FOF 2004 every time you run a sim.

3. Installation
---------------

You will require a web server that can parse PHP files.  Most web servers nowadays have this feature, but check with your webmaster or web service provider if you are unsure.

To install, unzip the contents of this folder to any folder on your remote web filesystem where your HTML standings and statistics pages reside.

(Optional) To change the colors of the tables, all you need to do is open "Options.php" in any word processor (Notepad, Emacs, etc).

To change the color of the title bars, change ONLY the line "$titleColor = ..." to a new Hexadecimal HTML color string.

To change the color of the rows of information, change ONLY the line "$rowColor = ..." to a new Hexadecimal HTML color string.
So, how does it work?  Simple.  Follow these steps:

4. Setting up Text Files
------------------------

This document assumes that you are able to print statistics from FOF 2004 to a text file.

1. Create the statistics text file.

2. Open the text file in any word processor (Notepad, Emacs, etc).

3. Search the file for any appearances of the words "Front Office Football 2004" within the data (not at the beginning of the file).  These will always be preceded by two characters, which are either carriage returns or undeciphered characters (), depending on the text editor you are using.  Delete both the two leading characters & the "Front Office Football 2004" wherever they appear.

4. Save the file.

5. Upload the file to the same directory of your web server as the web page that you want to display these statistics.


5. Outputting to HTML:
----------------------

You will need to only add two lines of code to your already existing HTML file to generate tables.  And, once you add these lines, you never have to edit them!  Isn't life wonderful?

To set up your HTML files:

1. Rename your "whatever.html" file to "whatever.php".  This will not change anything coded in HTML in the file, but it will recognize the PHP commands you are about to put in.

2. Insert the following code at the very top of the file:

<?php include 'FOFUtils.php'; ?>

3. Insert the following code into your HTML file whenever you want to print out the specific table:

League Standings: 
<?php standings(FILENAME); ?>

Passing Statistics:
<?php passing(FILENAME); ?>

Rushing Statistics:
<?php rushing(FILENAME); ?>

Receiving Statistics:
<?php receiving(FILENAME); ?>

Return Statistics:
<?php returns(FILENAME); ?>

Kicking Statistics:
<?php kicking(FILENAME); ?>

Defense Statistics:
<?php defense(FILENAME); ?>

Pass Coverage Statistics:
<?php passcover(FILENAME); ?>

Blocking Statistics:
<?php blocking(FILENAME); ?>

Miscellaneous Statistics:
<?php miscellaneous(FILENAME); ?>

In each case, replace FILENAME with the location of the proper file, surrounded by single quotes.  For example: 'standings.txt'.

That should do it.  Check out your new tables!

If you have any problems after following these instructions, you can email me at dave@tredsoft.com.  Please include your web page, as well as your 'Options.php' if you have changed that file with your email.

6. Version Updates
------------------
1.1 (12/5/03): Added ability to change color of title bars and information rows.

1.0 (12/5/03): Created & tested complete system.