PHP Classes

File: hyena-readme.txt

Recommend this page to a friend!
  Classes of S Lake   Hyena Template Engine   hyena-readme.txt   Download  
File: hyena-readme.txt
Role: Documentation
Content type: text/plain
Description: Hyena Template Engine Readme Text
Class: Hyena Template Engine
Engine that compiles templates into PHP scripts
Author: By
Last change:
Date: 17 years ago
Size: 2,467 bytes
 

Contents

Class file image Download
Hyena Template Engine Summary: Hyena is developed as a simple template engine designed to make web sites easier to design and develop. It is designed to work in both PHP 4 and 5. One feature borrowed from Smarty, is the compile/re-compile only when nessasary. On first run all the templates are compiled and copied to the page directory and then on every hit, if the template in template directory has not been modified since first compile, it will load the template from the page directory. This feature saves unnessasary overhead being used. Important note: feel free to customize it as you deem nessasary for your site or project. But please DO NOT resell it. If you make customizations or extensions that you think would benefit everyone using the engine, please forward a copy to me so that i can update the archive. Instrcutions: 1) To install the engine, just unzip the archive and dump into your web root or folder you wish to use this engine in. 2) Change the following in your configure.php file to match the set up to use. TEMPLATE, INCLUDES, URL, PAGE Example: URL: Address to where hyena is installed -> http://www.yoursite.com/hyena(or where you installed Hyena) TEMPLATE: Where you store your template files are stored On Linux-> /path/to/your/webdocs/hyena(or where you installed Hyena)/template On Windows->c:\\path\\to\\webdocs\\hyena(or where you installed Hyena)\\template PAGE: Where your compiled templates reside On Linux-> /path/to/your/webdocs/hyena(or where you installed Hyena)/page On Windows->c:\\path\\to\\webdocs\\hyena(or where you installed Hyena)\\page 3) Change permissions to 0755 on Page and Template directories. This is required to write out the compiled template files. Thats it, your ready to go. To Add new template tags to hyena, just open includes/tags.php and add them to the templatags array and the templareps array. Note: Add them in the same order in both arrays or you will not get the expected results. There are 3 predefined tags in the tags.php file: 1) <--DATE--> this will print out the current date and time. 2) <--URL--> this will print out the current URL as defined in configure.php. 3) <--IMAGES--> this will add the images directory off the current url. You can also use a database if your site requires one by adding your own php code to the template file that requires it.