the layout class included in this package is very similar to the first one used on track7 to perform all the common page layout tasks. it relies on the engine class (also in this package). this package also includes a form class which can be used to display html forms, a gpc class which helps manage user input, a size class which formats file sizes nicely, a url class which helps to manage urls, and a date class which helps manage and print dates. some scripts available on track7 which say that they require the layout classes will require these classes as well. engine.php and layout.php each contain some of these classes — the header at the top lists which ones, but it is not necessary to know this information.
to use the layout class on your own pages, write them similarly to this:
<?php require_once 'layout.php'; $layout->start('page title'); ?> <!-- regular page html here --> <?php $layout->end(); ?>
most likely you will want to modify the start and end functions of the layout class to your own layout. also note that the require_once statement is assuming that layout.php exists in the php include path, or in the same directory as the file which is requiring it. it is easiest to put the 3 php files included in this package into the same directory, then add that directory to the php include path. note that this directory does not need to be accessible through a browser.
besides modifications to
$layout->end, .consts.php needs to be modified with the correct database connection information in order for any database functions in the engine class to work correctly.