For Programmers: Free Programming Magazines  


Home > Archive > PHP Pear > July 2005 > [ANNOUNCEMENT] HTML_Template_Flexy-1.2.2 (stable) Released.









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author [ANNOUNCEMENT] HTML_Template_Flexy-1.2.2 (stable) Released.
PEAR Announce

2005-07-24, 8:39 pm

The new PEAR package HTML_Template_Flexy-1.2.2 (stable) has been released at http://pear.php.net/.

Release notes
-------------
Minor Bugfix Release

- Support Variables in Attributes of Flexy Elements (I would not recomend doing this, but
it appears to work!)
- Removed support for merging text and variables automatically for creating translation strings
(It never worked very well) the recommend way to mix variables and text for translation is to
use the translation markers {_( translation block with {flexy} {methods()} )_}
* Note these do not work correcty inside attributes values yet! - but will be fixed in the next release.
- Support for translator storing title= attribute values from <a> tags.
- Unix privaliges are 0664 for translation strings and element data.


Features / Fixes
bug #4103 - & replaced with & in attribute values of flexy elements
(  is still broken however.)
bug #3885 - Flexy_Factory::setRequired() did not reset return values correctly (note this feature is depreciated)
--- ----- - Fixed Number format modifier (found by new test suite)
--- ----- - Fixed Attribute method calls modifiers being chopped.
bug #3946 - Using flexy:raw (to put stuff like "checked" in) now produces a warning when used
with dynamic elements (use flexy:ignore="yes") to stop them being dynamic.



Package Info
-------------
HTML_Template_Flexy started it's life as a simplification of HTML_Template_Xipe,
however in Version 0.2, It became one of the first template engine to use a real Lexer,
rather than regex'es, making it possible to do things like ASP.net or Cold Fusion tags.
However, it still has a very simple set of goals.
- Very Simple API,
o easy to learn...
o prevents to much logic going in templates
- Easy to write document'able code
o By using object vars for a template rather than 'assign', you
can use phpdoc comments to list what variable you use.
- Editable in WYSIWYG editors
o you can create full featured templates, that doesnt get broken every time you edit with
Dreamweaver(tm) or Mozilla editor
o Uses namespaced attributes to add looping/conditionals
- Extremely Fast,
o runtime is at least 4 time smaller than most other template engines (eg. Smarty)
o uses compiled templates, as a result it is many times faster on blocks and loops than
than Regex templates (eg. IT/phplib)
- Safer (for cross site scripting attacks)
o All variables default to be output as HTML escaped (overridden with the :h modifier)
- Multilanguage support
o Parses strings out of template, so you can build translation tools
o Compiles language specific templates (so translation is only done once, not on every request)
- Full dynamic element support (like ASP.NET), so you can pick elements to replace at runtime

Features:
- {variable} to echo $object->variable
- {method()} to echo $object->method();
- {foreach:var,key,value} to PHP foreach loops
- tag attributes FLEXY:FOREACH, FLEXY:IF for looping and conditional HTML inclusion
- {if:variable} to PHP If statement
- {if:method()} to PHP If statement
- {else:} and {end:} to close or alternate If statements
- FORM to HTML_Template_Flexy_Element's
- replacement of INPUT, TEXTAREA and SELECT tags with HTML_Template_Flexy_Element code
use FLEXY:IGNORE (inherited) and FLEXY:IGNOREONLY (single) to prevent replacements
- FLEXY:START/FLEXY:STARTCHILDREN tags to define where template starts/finishes
- support for urlencoded braces {} in HTML attributes.
- documentation in the pear manual

- examples at http://cvs.php.net/cvs.php/pear/HTM...te_Flexy/tests/

** The long term plan for Flexy is to be integrated as a backend for the
Future Template Package (A BC wrapper will be made available - as I need
to use it too!)



Related Links
-------------
Package home: http://pear.php.net/package/HTML_Template_Flexy
Changelog: http://pear.php.net/package/HTML_Te.../download/1.2.2
Download: http://pear.php.net/get/HTML_Template_Flexy-1.2.2.tgz

Authors
-------------
Alan Knowles <alan@akbkhome.com> (lead)
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com