PHP Developer's Network : Network Member Forums

Class: XTemplate



  Search   All class groups   Latest entries   Top 10 charts   Newsletter   Blog   Forums   Help FAQ  
  Login   Register  
Recommend this page to a friend! Trackback URL: http://www.phpclasses.org/trackback/browse/package/62.html
      Classes of barnabás debreceni  > 
XTemplate
 >  Download  >  Support forum Support forum  >  RSS 1.0 feed RSS 2.0 feed Latest changes  >  Stumble It! Stumble It!  >  Bookmark in del.icio.us Bookmark in del.icio.us  
  Supplied by   Group folder image Groups   Detailed description  
  Rate classes User ratings   Applications   Related links   Files Files  
  • Supplied by:

  • Picture of barnabás debreceni
    Name: barnabás debreceni <e-mail contact>
    Published packages: 1
    Country: Hungary Hungary - PHP jobs in Hungary
    Home page: ???
    Age: ???
    All time rank: 319
    Week rank: 1717

    Browse this author's classes

  • Groups:

  • Group folder image
    Template processing engines and components
    View top rated classes
  • Detailed description:

  • Template engine for PHP that allows to store your html code apart from your php code. It was tested with php 3.0.11.

    It features:

    - Simple variable interpolation ( {STUFF} )
    - Array variable interpolation for eg. {ROW.ID} {ROW.NAME} {ROW.WHATEVER}, you assign an array to the variable ROW once
    - Global PHP variables available without making assigns for eg. {PHP.HTTP_HOST} {PHP.PHP_SELF} or any variable: {PHP.session_id}
    - Assign using arrays for eg. $xtpl->assign(array(STUFF=>"kewlstuff",ROW=>$row));
    - Default nullstring for unassigned variables and unparsed blocks, custom nullstring for every variable or block
    - Dynamic blocks:
    - Multiple level dynamic blocks (nested blocks)
    - Autoreset feature (do not reset subblocks when reparsing parent block)
    - recursive parse to parse all subblocks of a block
    - File(template) include: {FILE "another.template.xtpl"}, the included templates can also contain includes recursively.. uses fopen so you can include http:// and ftp:// files too
    - Very simple and powerful syntax, you'll love it :)

    The code is very short and very optimized, according to my speed tests it's the fastest template engine around which can do nested blocks and variables..

    The basic syntax is from FastTemplate and QuickTemplate (http://phpclasses.upperdesign.com/browse.html/package/49), but the entire class was written by me from scratch in one day, without a line from other
    template engines. THIS IS NOT A REWRITE OF OTHER ENGINES!

    The algorithm used makes this code amazing fast, you can do a bunch of nested dynamic blocks and everything you want, because it doesn't use recursive calls to build up the block tree.

    Contains 7 examples (which covers all features i think), I tried to write them so even newbies should understand easily.

    Docs and some functions i didn't need (clearing variables, etc) are still missing, but they'll come.

    Current version is 0.2.4.

    Licensed by LGPL.

    WARNING: these files are outdated, the latest versions available from the project homepage: http://xtpl.sourceforge.net/
  • User ratings:

  • Ratings
    Utility
    Consistency
    Documentation
    Examples
    Tests
    Videos
    Overall
    Rank
    All time:
    Good (80.0%)
    Good (81.3%)
    -
    -
    -
    -
    Not sure (48.1%)
    1210
    Month:
    Not yet rated by the users
  • Applications that use this class:

  • No application links were specified for this class.
    Add link image If you know an application of this package, send a message to the author to add a link here.
  • Related links:

  • Link Description
    Official Home of XTemplate
    Official Site for XTemplate - Be sure to check it out it contains brand new version of this class!
    http://freshmeat.net/appindex/2000/06/13/960897300.html
    freshmeat entry for the class
    XTemplate home
    XTemplate home @ sourceforge
  • Files:

  • File Role Description
    Plain text file description.txt ???
    contains the description of the class
    Plain text file ex1.p ???
    example 1 (demonstrates basic features)
    Plain text file ex1.xtpl ???
    template file for ex1.p
    Plain text file ex2.p ???
    example 2 (demonstrates nested blocks)
    Plain text file ex2.xtpl ???
    template file for ex2.p
    Plain text file ex3.p ???
    example 3 (demonstrates autoreset)
    Plain text file ex3.xtpl ???
    template file for ex3.p
    Plain text file ex4.p ???
    example 4 (demonstrates recursive parse)
    Plain text file ex4.xtpl ???
    template file for ex4.p
    Plain text file ex5.p ???
    example 5 (demonstrates SetNullString)
    Plain text file ex5.xtpl ???
    template file for ex5.p
    Plain text file ex6.p ???
    example 6 (demonstrates SetNullBlock)
    Plain text file ex6.xtpl ???
    template file for ex6.p
    Plain text file ex7-inc.xtpl ???
    needed by ex7.p
    Plain text file ex7-inc2.xtpl ???
    needed by ex7.p
    Plain text file ex7.p ???
    example 7 (demonstrates includes)
    Plain text file ex7.xtpl ???
    template file for ex7.p
    Plain text file license.txt ???
    GNU Lesser General Public License
    Plain text file xtpl.p ???
    XTemplate class file
    Download all files: xtemplate.tar.gz xtemplate.zip
    NOTICE: if you are using a download manager program like 'GetRight', please Login before trying to download this archive.

 
  Advertise on this site   Site map   Statistics   Site tips   Privacy policy   Contact  

For more information send a message to :
info at phpclasses dot org.
Copyright (c) Icontem 1999-2008 PHP Classes - PHP Class Scripts
  PHP Book Reviews - Reviews of books and other products