TinyButStrong 2.0 Migration Kit

This kit contains the following files:

File Description
tbs_20_migration_kit.htm (This document) What has changed and how to convert.
tbs_20_manual_diff.htm The normal manual for TBS 2.0 but showing new features.
tbs_class_20ce.php TBS 2.0 Compatible Edition - A special version compatible with TBS 1.x.

Table of Contents:

-> What has changed in TinyButStrong 2.0
-> How to convert from previous version



What has changed in TinyButStrong 2.0


TBS 2.0 will bring some new features but also arrangements.
Some old 1.x features will be unsupported in the future because they are heavy to keep for TBS.
In order to make the change more comfortable, two versions of TBS 2.0 will be released:
- TBS 2.0 (Normal Edition) will have some given up 1.x features,
- TBS 2.0 Compatible Edition will support both old and new features.

Please note:
- TBS 2.0 CE will not be continued, there will not be a TBS 2.1 CE.
- TBS 2.0 CE is faster than TBS 1.97 because of nice improvements.

Feel free to report bugs and to send comments by email.

New TBS 2.0 features
TBS 2.0
TBS 2.0 CE
Automatic fields and blocks: [onload] and [onshow] Ok Ok
Limit variable usage by prefix Ok Ok
Template variables Ok Ok
Merge several blocks with same data Ok Ok
Add a template to the current one Ok Ok
User function for Html conversion Ok Ok
Dynamic queries for Array Ok Ok
Parameter 'if' accepts [var] fields. Ok Ok
[blk.$] returns key of current record Ok Ok
Parameter 'magnet' replace parameter 'friend'. Ok Ok
Parameter 'selbounds' Ok Ok
Option to hide the navigation bar when only one page Ok Ok
Options for Navigation Bar on both Html and Php sides Ok Ok
Option TBS_CACHELOAD for CacheAction() Ok Ok
Parameter Show($Render) Ok Ok
Tag delimiters defined with instantiation Ok Ok
CacheMask defined with instantiation Ok Ok

Bug fix: negative value for option 'step'

Ok Ok
Bug fix: using PageNum=-1 Ok Ok
Bug fix: headergr worked only with lowercase columns Ok Ok
Error messages more clear Ok Ok
Faster execution Ok Ok
     
Given up TBS 1.x features
TBS 2.0
TBS 2.0 CE
[tbs_include] tags replaced Ok
[tbs_check] tags replaced Ok
[sys] tags replaced Ok
Parameters 'friend', 'friend2', 'frienda', 'friendb' replaced Ok
Global variables $tbs_ChrOpen and $tbs_ChrClose replaced Ok
Global variable $tbs_CacheMask replaced Ok
Global variables $tbs_CurrVal and $tbs_CurrRec x Ok
Global variable $tbs_TurboBlock X Ok
Deprecated [sys.merge_time] and [sys.template_time] X Ok
Deprecated parameters Show($End,$MergeVar,$OutPut) X Ok
Deprecated MergePHPVar() method X Ok
[var] tags are case insensitive X Ok
Blocks names are case insensitive X Ok
pos,min, and size options for navigation bar replaced Ok
Data source types: SQL-Server, ODBC and ADODB custom fct Ok



How to convert from a previous version

Here is a check list for converting your code and template made with TinyButStrong '1.x' or '2.0 Compatible Edition' into version '2.0 Normal Edition'.
You will probably have not a lot of change at the PHP side of your application. Most of the changes are about TBS global variable usage which is quite rare, and about deprecated features which are undocumented since many versions.
In another hand, you will have probably several changes at the Html side (templates), but they are not numerous and quite simple.

PHP Side:

Given up global variables
Replace $tbs_ChrOpen='{' and $tbs_ChrClose='}' with $TBS = new clsTinyButStrong('{}');
Replace $tbs_CurrVal by usage of parameter 'onformat' with a user function. See parameter 'onformat' for more details.
Delete $tbs_CurrRec by usage of parameter 'onsection' with a user function. See parameter 'onsection' for more details.
Replace $tbs_CacheMask (undocumented and unsupported) with ->CacheMask property.
Replace $tbs_TurboBlock (undocumented and unsupported) with ->TurboBlock property.
Given up database support
If you used SQL-Server, ODBC or ADODB connection, then add custom functions set (downloadable at the support page).
Syntax modification
If you used the ->MergeNavigationBar() method, change the keywords 'size', 'pos' and 'min' with 'navsize', 'navpos' and 'pagemin'.
Deprecated features (undocumented since many versions)
Replace ->MergePHPVar() with ->MergeSpecial('var')
Delete [sys.merge_time] and [sys.template_time] tags.
Replace parameters of the ->Show() method with usage of the ->Render property. See manual for more details.

HTML Side:

Replace [tbs_include] and [tbs_include.onload] tags with [onload] tags. You don't need to change parameters.
Replace [tbs_include.onshow] tags with [onshow] tags. You don't need to change parameters.
Replace [tbs_check] tags with [onshow]. Rename its parameters 'if' into 'when' and 'esle' into 'default'
Replace parameters friend, friend2, frienda, friendb by parameter magnet + mtype.
Replace [sys.*] fields with [var..*] fields.
Check [var.*] fields. They must be case sensitive.
Check blocks names. They must be case sensitive.