class.rFastTemplate.php ChangeLog

2002-10-01  Roland Roberts  

* class.rFastTemplate.php: Added /s qualify to PCRE regexps. This
makes multiline comments following the
{BEGIN,END}_DYNAMIC_TEMPLATE work as intended.

2002-09-24 Roland Roberts

* class.rFastTemplate.php (append): New function, equivalent to
$t->assign($t->getkey($key).$x). Actually its better than that
since it takes the same arguments as assign/setkey, i.e., it can
process an array argument.

2002-02-15 Roland Roberts

* class.rFastTemplate.php (quiet): was ignoring argument.

* class.rFastTemplate.php (missing_dir_okay) allows you to include
directories in the template path array which do not exist. The
default is 'false'. Think about organizing a web site into
sections which correspond to directories. The template tree
includes a generic menu plus specific menus for each section.
The specific menus are arranged in a directory tree parallel to
the main web site. If there is no specific menu, the generic
one is used. Previously, you had to create the directory tree
even if you had no templates to go in there.

2001-10-18 Roland Roberts

* class.rFastTemplate.php (clear): Made compatible with
FastTemplate. It wasn't even working consistently.

* class.rFastTemplate.php (clear_dynamic): New function,
compatible with FastTemplate. This will clear a dynamic
template so that on the next parse() of an outer template,
the inner template will be complately blanked; i.e., *all*
of the text will be removed including surrounding constant
text.

Note that this behavior may be surprising to users of
FastTemplate since that package completely and permanently
removes the template text from the template; as if the
template were an empty string. For a simple dynamic
template, the effect is the same, but for nested templates
where the inner template is used in a loop, the effect is
different. The rFT behavior allows the contents to be
temporarily blanked until the next loop. This allows you
to, for example, make a two-level list where some list
elements have not sub-lists but subsequent ones do.

* class.rFastTemplate.php (quiet): Added quiet() to allow you
to pass through template variables unchanged without
generating an error. I.e., normally, if something like
{FOO} appears in the text, it is either removed with
no_strict() or you get a warning message with strict().
This does neither, i.e., no warning and no removal.

2001-10-11 Roland Roberts

* class.rFastTemplate.php: Miscellaneous cleanup to run clean
with error_reporting(E_ALL).

2001-10-03 Roland Roberts

* class.rFastTemplate.php: Fixed
$t->parse(MAIN,array('table','main')) bug to be compatible
with FastTemplate. This will change the behavior for people
who were using the array() form, but I can't imagine how it
worked satisfactorily before.

2001-09-29 Roland Roberts

* class.rFastTemplate.php: Added define_raw() for shoving text
directly into a template.

2001-08-08 Roland Roberts

* class.rFastTemplate.php: Fixed problem with clearing
template results. Fixed typo in fetch that prevented
default from working.

2001-07-25 Roland Roberts

* class.rFastTemplate.php: Added "if($debug)" to all
$this->logwrite(...) calls.

* class.rFastTemplate.php: clear() and parse_internal_1() both
referenced an array element [results] which should have been
[result]. The meant neither were correctly clearing the
element.

2001-06-28 Roland Roberts

* class.rFastTemplate.php: Typo/thinko due to failed testing!

2001-06-27 Roland Roberts

* class.rFastTemplate.php: Fixed handling of no_strict() which
was broken after then last set of changes.

2001-06-18 Roland Roberts

* class.rFastTemplate.php: Fixed problem with templates being
parsed multiple times. Fixed problem with extra append of
template contents if the first call to parse() is in append
mode instead of overwrite mode.

* class.rFastTemplate.php: Fixed incorrect test for trailing
whitespace after END block.

* class.rFastTemplate.php: Fixed problem with double append in
[result] element.

* class.rFastTemplate.php: Added several logwrite sections to
help track differences with class.FastTemplate.php3. Added
class.FastTemplate.php3 compatible define_dynamic() to allow
dynamic templates to be declared. Added second optional
argument to define() to allow dynamic templates to be
defined by file rather than parent. If you have lots of
nested templates, this might be easier. Added support for
smarter autoloading so a declared dynamic template will try
to declared location first. If there is no declared
location, it will load all templates trying to find a match.

2001-06-15 Roland Roberts

* class.rFastTemplate.php: Skipping whitespace could back up
over a linefeed inappropriately. If a dynamic template
began at the start of a "part" it would be duplicated in the
output.

2001-06-14 Roland Roberts

* class.rFastTemplate.php: Fixed typo/thinko in unsetkey;
isempty changed to empty.

2001-06-12 Roland Roberts


* class.rFastTemplate.php: Merged in changes from Alister
Bulman . These include: (1) Changed
quotes from double to single where possible to avoid
unnecessary variable interpolation, (2) Allow multiple
template roots, (3) Remember last handle parsed for use with
FastPrint(), and (4) changed `if ($die == 1)' to simple `if
($die)'.

* class.rFastTemplate.php: Calls to $this->error() now use
"true" as the second argument rather than integer values.

* class.rFastTemplate.php: Formatting cleanup.

2001-06-13 Roland Roberts

* class.rFastTemplate.php: Fixed problem with trailing
comments in BEGIN/END blocks not being ignored.

* class.rFastTemplate.php: If the BEGIN/END block lives on a
line by itself, remove the complete line. More
specifically, if the only thing before the opening HTML
comment marker and after the closing HTML comment marker is
whitespace, we delete the whitespace as well. This prevents
unwanted whitespace from creaping into the file.