Most recent edit on 2009-07-22 13:57:40 by JeremyCoates [Changed link to phpnw09 conference]
Additions:
∞
Deletions:
∞
Edited on 2008-11-02 13:45:24 by JeremyCoates [Added PHPNW08 Logo and link]
Additions:
∞
Edited on 2008-09-17 13:13:01 by JeremyCoates [Updated news on SVN commits]
Additions:
- 17/09/2008: It's been a while since a public update, however the latest version is in SubVersion now:
- Big changes to tag callback regex - much improved
- change in constructor - now pass in an array of options
- assign objects as well as arrays
- _pre_var_dump made protected instead of private
- new protected method _ob_var_dump
Edited on 2007-08-17 12:20:35 by JeremyCoates [URL Change]
Additions:
- Further fix for $_SESSION being empty when used with XTemplate::scan_globals() - monitor & feedback∞ if you experience side-effects
Deletions:
- Further fix for $_SESSION being empty when used with XTemplate::scan_globals() - monitor & feedback∞ if you experience side-effects
Edited on 2007-08-16 21:17:09 by JeremyCoates [Updated latest news]
Additions:
- 16/08/2007: A couple of SubVersion code updates committed today including:
Re-factored tag callback code - improved functionality:
- Now can call {tag|callback1} {tag|callback2} {tag|callback1#With a comment} to get different output for each (thanks again for the feedback Oliver)
Further fix for $_SESSION being empty when used with XTemplate::scan_globals() - monitor & feedback∞ if you experience side-effects
Added XTemplate::comment_delim defaults to '#'
Added XTemplate::callback_delim defaults to '|'
Tag callback functions - improve security (thanks Oliver):
- Added XTemplate::allow_callbacks property (boolean) to allow switching functionality off
- Added XTemplate::allowed_callbacks (array) to limit functions available from templates
- Callbacks now only available for methods of subclasses of XTemplate or as functions in XTemplate::allowed_callbacks array
05/08/2007: Refactored website layout, ready for some updates and opened discussion forums∞.
Deletions:
- 05/08/2007: Refactored website layout, ready for some updates and opened discussion forums∞.
04/08/2007: A bug fix and some (nice) new changes released into SubVersion source tree:
- Fix for $_SESSION being empty when using scan_globals method in certain situations
- Changes to regular expressions: Now use definable delimiter throughout code $preg_delimiter, defaults to ` (backtick)
- Support top bit set characters x7f-xff in file, block and tags
- Major new feature: tag callback functions - allow calling of (mutiple) PHP methods (in XTemplate or it's subclasses) or
- functions from within a tag prior to output using | (pipe) as delimiter. See ex9.php
- contents of tag are sent as a parameter to the callback function or method. NB. Methods take priority over same named function
- e.g. {tagname|callback_function} for simple single parameter callback, tag contents passed as only parameter to callback.
- e.g. {tagname|callback_function('param1', 'param2', %s)} to allow mutiple parameters to be specified, %s replaced by tag contents.
- Real world chaining callbacks together:
- e.g. {tagname|str_replace('Hello World', 'Welcome to the Jungle', %s)|strtolower|ucwords|my_user_callback_func}
- (Inspired by sf feature request #1756946 christophe_lu)
- Altered debug code in text method to cater for situations when $tpldir may be an array
Edited on 2007-08-05 21:56:00 by JeremyCoates
Additions:
Deletions:
Edited on 2007-08-05 21:53:51 by JeremyCoates
Additions:
Deletions:
Edited on 2007-08-05 21:52:29 by JeremyCoates
Additions:
Deletions:
Edited on 2007-08-05 21:51:32 by JeremyCoates
Additions:
Deletions:
Edited on 2007-08-05 21:50:55 by JeremyCoates
Additions:
Deletions:
Edited on 2007-08-05 21:50:21 by JeremyCoates
Additions:
Deletions:
Edited on 2007-08-05 21:47:07 by JeremyCoates
Additions:
Deletions:
Edited on 2007-08-05 21:41:00 by JeremyCoates
Additions:
Deletions:
Edited on 2007-08-05 21:38:21 by JeremyCoates [Added forum news line]
Additions:
- 05/08/2007: Refactored website layout, ready for some updates and opened discussion forums∞.
Deletions:
- 29/05/2007: Updated SubVersion tree (see below) main addition Constructor argument $tpldir can now be an array of file paths. Rolled up SubVersion version trees into release 0.4.0 and released on Sourceforge∞ in PHP4/5 packages following the split in svn tree.
Edited on 2007-08-05 21:28:15 by JeremyCoates
Additions:
Deletions:
Edited on 2007-08-05 21:27:26 by JeremyCoates [Moved News Updates to NewsArchive]
Additions:
Older news can be found on the NewsArchive page
Deletions:
Older news can be found on the NewsUpdates page
Edited on 2007-08-05 21:19:33 by JeremyCoates [Changed Search link]
Additions:
Deletions:
Edited on 2007-08-05 21:05:07 by JeremyCoates
Additions:
Deletions:
Edited on 2007-08-05 20:58:47 by JeremyCoates
Deletions:
Resources
XTemplateDocumentation
XTemplateDownloads
XTemplateDevelopment
WhoUsesXTemplate
NewsUpdates
SubVersion Updates
Oldest known version of this page was edited on 2007-08-05 20:40:30 by JeremyCoates []
Page view:
PHP XTemplate
What is XTemplate?
PHP XTemplate is a cool templating engine for PHP.
XTemplate allows you to store your HTML code separately from your PHP code (as opposed to compiling your template into PHP as per Smarty etc.). It has many useful features such as nested blocks and various kinds of variable interpolation, and yet the code is very short and very optimized.
XTemplate has been around for several years, it is considered stable and mature and has been used in many projects, from
personal to larger commercial and open source ones. If you'd like to get involved in helping out, see
XTemplateContributions, otherwise please feel free to browse the site or get straight on with the
downloads.
Latest News
- 04/08/2007: A bug fix and some (nice) new changes released into SubVersion source tree:
- Fix for $_SESSION being empty when using scan_globals method in certain situations
- Changes to regular expressions: Now use definable delimiter throughout code $preg_delimiter, defaults to ` (backtick)
- Support top bit set characters x7f-xff in file, block and tags
- Major new feature: tag callback functions - allow calling of (mutiple) PHP methods (in XTemplate or it's subclasses) or
- functions from within a tag prior to output using | (pipe) as delimiter. See ex9.php
- contents of tag are sent as a parameter to the callback function or method. NB. Methods take priority over same named function
- e.g. {tagname|callback_function} for simple single parameter callback, tag contents passed as only parameter to callback.
- e.g. {tagname|callback_function('param1', 'param2', %s)} to allow mutiple parameters to be specified, %s replaced by tag contents.
- Real world chaining callbacks together:
- e.g. {tagname|str_replace('Hello World', 'Welcome to the Jungle', %s)|strtolower|ucwords|my_user_callback_func}
- (Inspired by sf feature request #1756946 christophe_lu)
- Altered debug code in text method to cater for situations when $tpldir may be an array
- 29/05/2007: Updated SubVersion tree (see below) main addition Constructor argument $tpldir can now be an array of file paths. Rolled up SubVersion version trees into release 0.4.0 and released on Sourceforge∞ in PHP4/5 packages following the split in svn tree.
Older news can be found on the
NewsUpdates page
Resources
XTemplateDocumentation
XTemplateDownloads
XTemplateDevelopment
WhoUsesXTemplate
NewsUpdates
SubVersion Updates
Latest Release
Version 0.4.0 is the
current release available for both PHP 5 and PHP 4.
SourceForge.net: Project Summary: PHP XTemplate (xtpl project)