PHP Classes
elePHPant
Icontem

LiteTplEngine: Template engine based on PHP scripts

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Info   View files View files (15)   DownloadInstall with Composer Download .zip   Reputation   Support forum (1)   Blog    
Last Updated Ratings Unique User Downloads Download Rankings  
2008-07-21 (7 years ago) RSS 2.0 feedNot enough user ratingsTotal: 478 All time: 5,528 This week: 1,120Up
Version License PHP version Categories  
litetplengine 0.9GNU General Publi...4.3Templates
Description Author  

This class implements a template engine based on PHP script templates.

It assigns template variables to local PHP variables and includes the template PHP scripts.

The output of the included template scripts is captured and returned by the class.

The class can also process templates for generating Javascript and CSS that is store in given files.

Picture of solomongaby
Name: solomongaby is available for providing paid consulting. Contact solomongaby .
Classes: 10 packages by
Country: Romania Romania
Age: 30
All time rank: 1654 in Romania Romania
Week rank: 426 Down9 in Romania Romania Down
Innovation award
Innovation award
Nominee: 1x

Details provided by the author  
Introduction :

I made this class because i belive that using template engines like Smarty or other ones that used compiled templates and have a special syntax are only going to make the application slower. 
PHP has already a build template system, why not take advantage of it ?
Some people are saying that template systems are easyer because the designer doenst need to lear php, well what the diference between :
		{foreach},{/foreach} and <?php foreach : ?>,<?php endforeach; ?>
The tags might be a bit longer, but it will increase you application speed. Plus it will allow you to place some php in your templates .. that other templates engines dont allow you to.

Steps to install the LiteTplEngine :
- copy all the files to youre website.

- make sure to make the folders images, java, styles in the templates/default folder .. 
this is where you will store the images, javascripts files and css files .. prety self explanetary :D

- add a folder templates_c in the templates/default folder and make sure you set the rights 777 to it ... so php can write into it ... 
 will all the compressed css and js files will be saved

next try and see how i made a simple page. For any quoestions :
YM: solomongaby
MSN: solomongaby@yahoo.com
  Files folder image Files  
File Role Description
Files folder imageincludes (2 files)
Files folder imagetemplates (1 directory)
Accessible without login Plain text file common.php Aux. example file
Accessible without login Plain text file common_bottom.php Aux. end script execution file
Accessible without login Plain text file index.php Example example file
Accessible without login Plain text file readme.txt Doc. instruction file

  Files folder image Files  /  includes  
File Role Description
  Plain text file templateEngine.php Class main class file
  Plain text file templateSetup.php Class template class setup

  Files folder image Files  /  templates  
File Role Description
Files folder imagedefault (5 files, 4 directories)

  Files folder image Files  /  templates  /  default  
File Role Description
Files folder imageimages (1 file)
Files folder imagejavascript (1 file)
Files folder imagestyles (1 file)
Files folder imagetemplates_c (1 file)
  Accessible without login Plain text file index.php Aux. template file
  Accessible without login Plain text file _home.php Aux. template file
  Accessible without login Plain text file _leftMenu.php Aux. template file
  Accessible without login Plain text file _overallFooter.php Aux. template file
  Accessible without login Plain text file _topBaner.php Aux. template file

  Files folder image Files  /  templates  /  default  /  images  
File Role Description
  Accessible without login Plain text file info.txt Doc. images information file

  Files folder image Files  /  templates  /  default  /  javascript  
File Role Description
  Accessible without login Plain text file main.js Example sample js file

  Files folder image Files  /  templates  /  default  /  styles  
File Role Description
  Accessible without login Plain text file main.css Aux. template css file

  Files folder image Files  /  templates  /  default  /  templates_c  
File Role Description
  Accessible without login Plain text file info.txt Doc. instruction file

 Version Control Unique User Downloads Download Rankings  
 0%Total:478All time:5,528
 This week:0This week:1,120Up