ChangeLog for TBS 2.x

Version Date Fixes / new features

orange pin Fixed bug: [var] fields embedded into a parameter 'script' were not merged.
orange pin Fixed bug: Miscelaneous merging problems with PHP 5.0.5 or higher.
With PHP 5.0.5 and next versions, some variable reference behaviour have changed. This could produce miscellaneous small problem when merging data. This is now fixed for all PHP versions.
orange pin Fixed bug: Erroneous merging when using parameter 'serial'.
When the serial mode is activated by parameter 'serial', TBS could produce bad placement of sub-sections when subsection were numbered in a different order than they appear in the source.
+ Fixed problem: Merging problems with PHP 4.4.1
The problem described in previous change-log is now fixed for the tree syntaxes:
orange Fixed bug: TinyButStrong Error (Tag definition): Can't found the end of the tag ...
This error could occur in some circumstances and when many TBS tags or [val] keywords where embedded.
+ Fixed problem: Merging problems with PHP 4.4.1
This PHP version has a bad bug about Array global variables assigned by reference (bug info). This PHP bug makes TBS to seem to display allays the same record when using MergeBlock() with the keyword 'array' as data source.
Example : $TBS->Merblock('blk','array','myvariable');
This PHP bug is by-passed by TBS using a trap which makes this feature a bit less optimized but only with PHP 4.4.1. This bug is already supposed to disappear with the next PHP version.
Fixed bug: parameter 'headergrp' not working with explicit syntax
Now TBS support self embedded sections of block coded with the explicit syntax (that is using "block=begin"/"block=end"). So blocks coded with parameter 'headergrp' and explicit syntax will work. That is the same for automatic blocks (such as onload or onshow) self embedded even this use is not referenced.
Fixed bug: Miscelaneous merging problems with PHP 5.0.5 or higher.
Php 5.0.5 changes its behavior about variables assigned by reference by a function which not itself return value by reference. This is not considered as a Php bug because such usage is not referenced in the Php manual. Therefore, this new TBS version fixes many merging problem coming from this Php change of behavior.
Fixed bug: Warning: call_user_func_array(): First argumented is expected to be a valid callback
This warning could happen when using parameter 'ondata' with an array as data source, or when merging several block with the same query.
This is now fixed.
Fixed bug: Error message when using MergeBlock() with no data, or with keyword 'clear', and when the template contains some fields outside the block bounds.
This is an old bug for all version 2.x. TBS should deleted those fields, and a fields like [blk.#] should display 0. This is now fixed.
2.05 2005-08-31
New feature: Parameter 'ondata' for blocks.
This parameter executes a custom user function each time a record is fetched from the data source. The difference with 'onsection' is that 'onsection' function is called each time a section is displayed. An 'ondata' function allows to modify the current record only once for any sections and also to calculate columns that can be used for header sections.
+ Improvement: No tags, no query.
When MergeBlock() doesn't find any blocks or fields to merge for the given name, then the query is not sent to the data source. This allows to avoid the problem of invalid SQL query statement when you use dynamic queries with sub-blocks which are absent.
+ Improvement: Spaces allowed to mentionate several blocks to merge.
For example: $TBS->MergeBlock('b1, b2',$conn,'select...'); is now ok.
+ Improvement: Can merge several Navigation bars in one shot, the same way as for MergeBlock().
+ Improvement: More data source keywords available.
When database functions are not found for a given keyword, TBS tries to find functions for the same keyword but without suffix. This allows to have the same database functions set for several extended object classes, for example with ezSql, or PearDB. The class name for a PearDB connection on a MySql database is 'db_mysql', the first function should be named tbsdb_db_mysql_open(), now tbsdb_db_open() is also accepted.
Fixed bug: Error message more coherent when a database custom function is not found.
Fixed bug: Parameter 'noerr' is now supported for parameter 'script'.

Fixed bug: When you use the MergeBlock() method in Page Mode, using the argument NumPage = -1, then no data is merged while the data source can contain several records. Also a wrong page with the wrong number of records can be displayed if your data source is a Php Array.
This could happen under special circumstances i.e. when the last page has only one record to display or when the data source is a Php Array .
Fixed bug: A field linked to a block and using parameter 'if' displays the same data for several records.
This could happen when parameters 'then' or 'else' use embeded fields.
Fixed bug: 'onsection' custom function not executed on special sections like 'headergrp' sections.
Now all special sections make the custom function to be called.
Fixed bug: the message "The field ... can't be merged because the limit (64) is riched. You maybe have self-included templates." could be displayed whenever there were less than 64 self included templates.
Fixed bug: Embedded Special Var Fields incorrectly merged.
When a Special Var field (such as []) was embedded into another TBS field orin a sub-template, the data displayed was replaced by another part of the template.
Fixed bug: No Html conversion for Var fields embedded in paremeters 'then' and 'else'.
Now embedded Var fields have a default Html conversion behavior. This conversion can be tuned using paremeter 'htmlconv' like for any TBS fields.
for PHP 5
Fixed bug: Strict Standards: Only variable references should be returned by reference in ...\tbs_class.php
2.02.1 2005-04-19
Fixed bug: Display the name of an object's property instead of '' when it's null or not set.
Example: when you put [var.myobj.prop1], if $myobj->prop1 is not set or null, then the field displayed 'prop1'. It happened only for objects and in version 2.02. This bug is now fixed.

2.02 2005-04-17
New feature: Conditional sections available for normal blocks.
Parameter 'when' was supported only for [onload] and [onshow] automatic blocks. Now it's supported in any block, even blocks to be merged with data.
New feature: Object Oriented Programming (OOP) features.
Now you can work with you're object's properties instead of global variables, and object's methods instead of user functions. Both in PHP and HTML sides.
New feature: Subtemplate mode.
Parameter 'subtpl', used with parameter 'onsection' or 'script', turnes TBS in a subtemplate mode that enables you to works on a subtemplate like if it was a normal template.
New feature: Parameter 'frm' allows multi-format for dates.
This is useful to define a special display for dates set to null or zero.
New feature: Conversion to JavaScript string.
The new keyword 'js' for parameter 'htmlconv' prepare a string to be inserted into JavaScript text delimiters.
New feature: Parameter 'parentgrp' for blocks.
It works like a header group section that can contain sub-sections.
New feature: New constants for the CacheAction() method.
+ Improvement: New syntax for parameter 'extend'.
The first syntax is 'extend=n'. Now it also supports 'extend=tag1,tag2,...'
+ Improvement: Var fields supported inside parameters 'then' and 'else'.
+ Improvement: Custom markers for TBS tags can have several characters.
For example, you can change markers [ and ] to {{ and }}.
+ Improvement: Merging optimization.
Fixed bug: Parameter selected=tag doesn't work with attributes ID and NAME uppercase
Fixed bug: Parameter selected=tag checks items of other names.
This could happen in some circumstance.
Fixed bug: Parameter 'splittergrp' doesn't work when parameter 'headergrp' is not used.
Fixed bug: Method GetBlockSource() deletes TBS block's definition tags.
This could happen when you used the explicit syntax.
Fixed bug: Var fields embedded into a 'm+m' magnet Var field are omitted.
Fixed bug: CacheAction() method always returns false with TBS_DELETE.
Now it returns the number of deleted files.
Fixed bug: 'onsection' custom function executed for the 'nodata' section.
Custom function is now executed with an existing record.
Fixed bug: TBS protection is activated when working on non-html templates.
Now TBS protection is disabled when you specify a charset equal to false on LoadTemplate() method.
Fixed bug: TBS protection is activated when using parameter 'script'.
Now TBS protection is disabled when using parameter 'script'.
Change: Default Html conversion uses htmlspecialchars() instead of htmlentities().
Now Html conversion uses the Php function htmlentities () only if you specify a charset on LoadTemplate(). This should not change the display of your Html page.

2.01 2005-01-03
New feature: new parameter 'footergrp'.
New feature: new parameter 'splittergrp'.
New feature: you can read field's parameters when using MergeField() with a custom function.
in fact, it was already available with TBS 2.0 but undocumented.
New feature: MergeBlock() accepts objects with custom data methods.
+ Improvement: Navigation bar's options in the template are now available at any sections.
They used to be available only in the first section of the block.
Fixed bug: LoadTemplate() with charset equal to false didn't work.
Fixed bug: Notice: Array to string conversion in ...\tbs_class.php
It also could happen with Object instead of Array. This occurred when merging a field (linked to a block or not) with an array or an object.
Fixed bug: error messages deleted when merging a dynamic array query with keys not found.
It used to be considered as an error, now it is considered as an empty query result.
Fixed bug: extra error messages deleted when fail to open the data source.

2.0 2004-10-24
New feature: limit variable usage by prefix.
New feature: new property ->TplVars, allows to retrieve Template variables.
New feature: merge several blocks with same data.
New feature: clear a block using keyword 'clear'.
New feature: merge a conditional block before the ->Show() method.
New feature: add a template to the current one.
New feature: user function for Html conversion.
New feature: dynamic queries for Array.
New feature: parameter 'if' accepts [var] fields.
New feature: [blk.$] returns key of current record.
New feature: new parameter 'selbounds' to define bounds used by 'selected'.
New feature: option TBS_CACHELOAD for the ->CacheAction() method.
New feature: option 'navdel' hides the navigation bar when only one page.
New feature: options for Navigation Bar available on both Html and Php sides.
+ Improvement: faster execution.
+ Improvement: some error messages more clear.
Fixed bug: negative value for option 'step'.
Fixed bug: using PageNum=-1.
Fixed bug: parameter headergr worked only with lowercase columns.
Please note that old and deleted features are still available using TBS 2.0 Compatible Edition.
Change: ->MergeBlock() becomes case sensitive for block names.
Change: [var.*] fields become case sensitive for variable names.
Change: fields [tbs_include] and [tbs_check] are replaced by [onload] and [onshow].
Change: parameters friend, friend2, frienda, friendb are replaced by magnet + mtype.
Change: [sys.*] fields are replaced by [var..*] fields.
Change: TBS global variables $tbs_* are replaced by class instantiation parameters.
Change: options pos,size, and min options for navigation bar are replaced by navpos, navesize and pagemin.
Change: SQL-Server, ODBC and ADODB are no longer available in native. They need database functions.
Deleted feature: deprecated parameters $End, $MergeVar, $OutPut for ->Show() method are no longer available.
Deleted feature: [sys.merge_time] and [sys.script_time] deprecated system fields are no longer available.
Deleted feature: ->MergePHPVar() deprecated method is no longer available.