Installation is simple. The main file is called "display_student.inc" and 
should probably not be edited or inspected. It's really ugly. Just stick it 
somewhere on your include path. 

If you are using PHPLIB, just stick it in your php/ directory and you should be
fine.

If you are not using PHPLIB, you've got a problem, since ET currently depends
on the database functionality of PHPLIB. For more information about PHPLIB
(which is a really awesome library) go to http://phplib.netuse.de

Note: ET was developed for PHPLIB 6.4 although it should work fine with
      later versions. Also, technically you don't need all of PHPLIB, just the
      relevant DB_* include files.

Now, before you can do anything with EnzymeTemplates, you have to have two
things. One is an include file that contains the objects and tables to be
used. In the demo app ours is called template_objects.inc as this is a good
name for what we're including. Second is a directory called themes/ that 
contains your actual templates. I don't yet have any good docs on how to 
create these from scratch, but if you follow these directions, you'll be able
to figure it out from the thorough demo.

The last installation step is to modify your PHPLIB's local.inc to have a
database subclass called "DB_Readonly" which is used for accessing the 
data you want to display. Mine looks like this:

class DB_Readonly extends DB_Sql 
{
  var $Host     = "localhost";             
  var $Database = "template-db";         
  var $User     = "READONLY_USER";         
  var $Password = "READONLY_PW";
  
}

use whatever username and password you want.

NEW in 0.6 - you don't have to use DB_Readonly! Just set the "db" member
of your top-level object to the name of whatever db class you like. This
still must be a valid PHPLIB db subclass.


TO INSTALL THE DEMO
-------------------

Since there isn't much documentation, you'll need to install the demo to
figure out what this library does. It's easy, I'll walk you through it.
I'm assuming you're using MySQL 3.22.25 or something similar since that's
what I use.

First, unpack the contents of the EnzymeTemplate tarball into a directory
that is accessible somehow via the web. Be sure to chmod things appropriately
(if you're not sure, try 'chmod a+rx -R *')

Now, you need to create a database for the demo. Let's call it "template-db"
for now, but you can call it anything you want. Create the database:

% mysqladmin -p create template-db

Now, load the sample schema into the database:

% mysql -p template-db < sample_schema.sql

Last, load the sample data (which is a bit large, sorry about that):

% mysql -p -f template-db < all_data.sql

You may get some error messages at this stage, but don't worry about them. 
They are the result of my sloppy SQL generation for this demo. They are 
harmless (as long as you say -f) and look like this:

ERROR 1146 at line 18785: Table 'template.student_points' doesn't exist
ERROR 1146 at line 18830: Table 'template.student_setting' doesn't exist

The last step is to modify your PHPLIB "local.inc" file to include the
DB_Readonly class mentioned above.

Assuming all of that works, you should be able to access the file demo.php3
via your web browser and play around. For more information about what is 
going on with the demo, see the DEMO file.

Enjoy,

Eric

