|
TemplatePower
ChangeLog
Version
3.0.2
15 March 2003
- bugfix in function
header assignGlobal()
- fix in internal
errordisplay-routine ("\r\n")
Version
3.0.1
26 April 2002
- bugfix ignore-tag
- bugfix assignInclude
=> INCLUDESCRIPT
- bugfix initialization
$this->serialized = false;
Version
3.0
25 April 2002
- added database/var
template support
Version
2.0 alpha
7 february 2002
- added multiple
variable assign by one assign statement, using an associative array.
$tpl->assign( Array(
VARNAME1 => "value", VARNAME2 => "value" ) );
Version
2.0 beta
13 november
2001
- added re-use
tag (test state). Works, at the moment, only OK for blocks with NO child-
or subblocks.
<!-- REUSE BLOCK : orignalblockname
AS copyblockname -->
30
october 2001
- bugfix in ouputContent
function. Reported by Luca Venuti, SPRING snc. Should avoid getting the following
error:
Warning: Undefined index: _B:blockname
in class.TemplatePower.inc.php on line 367
22
october 2001
- added global
assign of variables. Using:
$tpl->assignGlobal( "varname", "global
value" );
The global-value
can be overridden in each individual block by:
$tpl->assign( "varname", "local
value" );
18
october 2001
- added PHP-file
include tag, like the the function include() in PHP with one difference. Only
the output of the include file will be saved in the template.
<!-- INCLUDESCRIPT BLOCK
: a_name -->
can be assigned
in your controllscript by:
$tpl->assignInclude( "a_name", "./a_file.php" );
04
september 2001
- removed some
'unneeded' code in the var parsing part in function parseTemplate(),
- added ignore
tag to overrided parsing of vars/blocks, these will just be parsed as code.
<!-- START IGNORE
-->
[some code/html here]
<!-- END IGNORE -->
- added functionallity
to save parsed templates for later use. So the parsing doesn't happen everytime
a script is runned. This functionallity leads to some execution speed. Just
run a php script like below :
(Note: the parsed template need to be saved in a directory where PHP can write)
<?php
require_once( "./class.TemplatePower.inc.php" );
//first
parameter => base template file, second parameter => filename to save
parsedtemplate to
$stpl = new TPLSerializer( "./my_base_template.tpl", "./saved_parsed_tpl.stpl" );
$stpl->assignInclude("my_include_block", "./include.tpl");
//parse
template and save it on disk
$stpl->doSerialize();
?>
In your template controllscript
you have to do like the following:
<?php
require_once( "./class.TemplatePower.inc.php" );
//the
last parameter indicates if it's a saved template
$tpl = new TemplatePower( "./saved_parsed_tpl.stpl", true );
//we
don't need the
function assignInclude()
anymore.
$tpl->prepare();
$tpl->assign("name", "RoVeL");
$tpl->printToScreen();
?>
Version
1.6.2
30 october 2001
- bugfix in ouputContent
function. Reported by Luca Venuti, SPRING snc. Should avoid getting the following
error:
Warning: Undefined index: _B:blockname
in class.TemplatePower.inc.php on line 367
29
august 2001
- made improvement
to the var parsing part in function parseTemplate(), which lead to faster
parse speed.
- added function
showUnAssigned(); Show/hide unassigned vars. Default is hide.
- added function
gotoBlock(); Sets current block to existing given block.
Version
1.6.1
10 august 2001
- fixed bug function
cleanUp()
changed unset( $this->{tplvar} );
in unset( $this->{$tplvar} );
(I forgot the '$' :-P )
- added $this->tpl_count
= 0; to constructor
|