Support

Newsletter and Mailing list

↑ top

If you'd like to receive a tiny flash news-letter when there is a fresh new release or any interesting information related to TBS, then you can subscribe to TBS-news.

If you'd like to participate, comment, criticize, or just get informed about the development related to TBS (the engines, the plugins, , the tools,..), then you can subscribe to the TBS-dev mailing list. Please note that this mailing list is not for getting help on TBS development, the forum is made for that.

Git

↑ top

The source code of the TBS project (engine, plug-ins, tools, ...) is hosted at GitHub.

Golden Rules

↑ top

Here are some golden rules for TBS Template Engine. If you know them it will be more easy to build and understand your first TBS templates.

1) When you call a method, TinyButStrong immediately applies changes in property $TBS->Source

Some other template engines (like Smarty) work by preassigning variables, and the merging is processed in one shot at the end. TinyButStrong doesn't work this way. As soon as you're calling a method, then the effects are immediately applied into property $TBS->source.

For example, just after $TBS->LoadTemplate(...) is called, the property $TBS->Source already contains the wanted template having all [onload] tags processed. Also, when you call $TBS->MergeBlock('b1',...) then $TBS->Source contains the result having block "b1" merged. All [b1] tags have so been replaced and no longer exist.

Knowing this, you can understand that the order of which you are merging blocks can affect the result.

In the example below, merging blocks "gender" and "vip" will not produce the same result has "vip" and "gender". (see golden rule #4 for more details)

[vip.name;block=tr] Gender:

2) You can define fields which are explicitely merged when the template is loaded

Since TBS version 3.2.0, the special [onload] fields are merged just when $TBS->LoadTemplate() is called.

For example: in order to merge the global variable $x, then use [onload.x]. (references to global variables is a default behavior which can be tuned)

In another hand, the special [onshow] fields are merged just when $TBS->Show() is called.

3) Block parameters are taken into account only if parameter "block" is also defined

TinyButStrong has some block parameters and some field parameters which are all different.

Examples:

Whether you are using the normal syntax or the simplified syntax, a tag is recognized has a block tag only if it has the parameter block. If it hasn't such a parameter, then any other block parameters are simply ignored by TBS and you won't have any error message for that because TBS allows any extra parameters.

Examples of bad and good:

Bad Good
[b1.col1;bmagnet=div] [b1.col1;magnet=div]
[b2;block=tr;frm='yyyy-mm-dd'] [b2;block=tr]
[onload;when [var.x]=1] [onload;block=tr;when [var.x]=1]
[var.x;when [var.x]=1;then 'one'] [var.x;if [var.x]=1;then 'one']

4) Contents placed between the sections of a same block are always deleted

In the example below, the block named "b1" has two sections (a yellow one and a blue one). An orange row is placed between those two sections. But when the block "b1" is merged with $TBS->MergeBlock('b1',...) then the orange row will be completely deleted and will never be displayed. TinyButStrong does not keep this zone simply because there is no logical way to process it. When you define the sections of a same block, there should not be any contents between them.

[b1.id;block=tr]
 
[b1.id;block=tr]

This behavior also explains why you're loosing the line breaks placed between <tr> when your template contains "block=tr". The line breaks between <tr> are deleted, all <tr> sections of the block are collapsed. If this is a problem for you, you can try the definition "block=tr+_" (see the manual to know more).

5) During Subtemplate Mode, all outputs are buffered and not displayed

Parameters script and file can make TBS to work in a subtemplate mode. In this subtemplate mode, any normal output is stored into a buffer (this includes PHP error messages). When TBS get out of the subtemplate mode, then the buffered data is placed into the template.

Thus if for some reasons a PHP fatal error occurs and stops the running script, then no buffered data is prompted and all what you'll see is a blank page. If you met such a problem, we suggest that you debug your subscript in a normal mode.

If a PHP error occurs but does not stops the running script, then PHP error message will be inserted inside the main template.

FAQ

↑ top

How to:

-> There is also a Tips & Tricks forum for more How To.

Problems:

-> You can also perform a search in the forum for more aswers to your problem.

How to

How to change markers '[' and ']' to '{' and '}' or something else ?

Field and block markers have been set to '[' and ']' only for optimisation consideration. '{' and '}' are common in Javascript code and Style definitions, but '[' and ']' are more rare.

TBS >= 2.02: Markers can have several characters. $TBS = new clsTinyButStrong('{{,}}');

TBS 2.00 and 2.01: Markers must have only one character. $TBS = new clsTinyButStrong('{}');

TBS 1.x (>= 1.60) Markers must have only one character.

$GLOBALS['tbs_ChrOpen'] = '{' ; // to set after include_once('tbs_class.php')
$GLOBALS['tbs_ChrClose'] = '}' ;

TBS < 1.60: Markers cannot be changed.

How to load a template from string instead of a file ?

Do: $TBS->Source = $my_string;

To process [onload] tags if any, with TBS >= 3.0: $TBS->MergeField('onload');

To process [onload] tags if any, with TBS < 3.0: $TBS->MergeSpecial('onload');

How to limit the usage of global variables in the template ?

Limit the hallowed global variables by a prefix: the second argument of the TinyButStrong instantiation enables you to define a prefix for variable limitation in the template.

Example: $TBS = new clsTinyButStrong('','pref_');

Other Var fields will produce a TBS error when the template is processed.

Limit the hallowed global variables by a list:

 $allowed_vars['var1'] =& $var1;
 $allowed_vars['var2'] =& $var2;
 $TBS = new clsTinyButStrong('','allowed_vars');

How to save the merge in a string instead of display it direcly ?

Example:

TBS->Render = TBS_NOTHING; // No exit, no output
$TBS->Show()               // Merges Var fields and [onshow] fields
$result = $TBS->Source;    // Get the current result

More info about the properties Render and Source.

How to make a condition for parameter if/when using operators like AND, OR ?

Parameters if and when don't support logical operators, but only comparaisons bewteen two strings.

Operator AND can be replaced by a string concatenation. For example: [onload;if '[var.x1]-[var.x2]'='a-b';then ...]

This condition is the same as: ([var.x1]=='a') AND ([var.x2]=='b')

Since TBS 3.0, you can define several if/then parameters. For example: [onload;if [var.x1]=1;then 'One';if [var.x1]=2;then 'Two';if [var.x1]=3;then 'Three';else 'More than three']

But for OR usage, and also for more complicated expressions, you will need to use a custom function to performe the check. Example : [onload;onformat=f_mycheck]

PHP:

function f_mycheck($FldName,&$CurrVal) {
  global $x1, $x2; 
  if (($x1=='a') OR ($x2=='b')) then {
    $CurrVal = 'ok'; 
  } else {
    $CurrVal = 'not ok'; 
  }
}

When can I embed [var] fields into other TBS fields ?

[var] fields are always examined into parameters file, script, when, if, and since TBS version 2.02: then, else and subtpl. TBS fields are not examined in others paremeters. So if you use embedded [var] fields in other paremeters, they won't be merged in the same time as the embeding field.

When can I use keyword [val] ?

Keyword [val] is supported in parameters file, script, if, then, else and subtpl. In other parameters this keywords is considered as a common string.

Keyword [val] is sensitive to the TBS tags markers. For example, if you set the TBS markers to '{' and '}', then the keyword becomes {val}.

How to have a headergrp containg sections of the same block ?

Since TBS version 2.02, there is a new parameter parentgrp that enables you to display a header section that can contain sub-sections of the same block. This is the only case when a TBS section can embed sections of the same block.

The merge is too slow

TinyButStrong is a Template Engine which has good merging performance. Just a bit faster that Smarty or other without template compilation. Like for any Template Engine, the speed of your merge depends a lot on your template's structure. Here are some advices for optimizing your templates.


spot Don't multiply automatic fields [onshow]. It means that you'd better not put [onshow] TBS fields inside some sections of your template that will be merged with MergeBlock(). Otherwise, the number of [onshow] fields will be increased before to be merged ([onshow] fields are processed when Show() method is called). This can slow down your merging very much.


spot For the same reason, don't multiply [var] fields or other TBS fields that could be evaluated only once before a block is merged.


spot Use parameter selected with parsimony (not too much). This parameter is quite smart but it needs HTML analyse processes. Such processes cost certain execution time. This is not sensible if they are not numerous, but they can slow down the merge when they are much.


spot When your template has many complex dynamic parts, it is better to migrate the conditional statements from the HTML side to the PHP side.

Problems

Why [ chars are converted into HTML code &#91; ?

Since version 1.64, TBS has a Protection System which is enabled by default for each field. This protection consist in replacing all characters [ with its HTML equivalent &#91; for any merged data coming from outside the template (PHP variables, MySQL,...). You can deactivate the Protection System for any TBS fields using parameter protect=no.

See the manual for more details.

All TBS fields are ignored in my subtemplate

With TBS version < 2.02, the Protection System stay activated for parameter script. So if you use this parameter to insert something containing TBS fields, then this fields are disabled by replacement of characters [ with &#91;

To by-pass this problem, you just have to set parameter protect=no in the TBS tag, or to us TBS version >= 2.02.

Example: [onload;script=subcode.php;protect=no]

The MySQL example page doesn't work localy

This example provided with the TBS Example Set needs to have a specific MySQL table and to connect to it. This table is available at this web site but not on your computer. The error message return by PHP is:

Fatal error: Failed opening required '/cnx_mysql.php' (include_path='.;c:\php\includes') in [...]\tbs_us_examples_datamysql.php on line xx

I have the error TinyButStrong error: the cache file'...' can not be saved

This error message occurs when PHP raise an error when attempting to save the cache file on the server.

Most of the time, this is because there is no 'write' permission on the directory. Try to chnage the Unix permisson.

Then you should probably change the Unix permission of the directory on the server where you're trying to save the cache file.

My subtemplate is included at the beginning of the template

This can happen if you used the parameter script instead of parameter file.

The nodata section is not displayed when data is empty.

First check that you 'nodata' section is not embedded into another section of the block.

If you're merging data stored into an array, then an empty data should bee an empty array ( like array() ) ; values null or false are not considered as an empty data. They simply cannod be merged.

Example of what you can do to be sure that data is not the false or the null value:

$data = ...
if ($data===false) $data = array();
$TBS->MergeBlock('blk',$data);

Some block parameters (like ondata, parentgrp,...) seem to be ignored

They are two cases when a block parameter seems to be ignored by TBS. The first one in when the block parameter is not placed in the TBS tag that contains the block definition. That is TBS tag with parameter block=.... The second case is when you have too much parameter block=... inside a section. In such a case, only the first parameter block=... is taken in acount ; following block definition are ignored (note taht with explicit syntax, following tag with block=end is accepeted).

Here are some examples :

•  <div>[blk1.firstname;block=div] ... [blk1.subname;ondata=my_function]</div> Bad : parameter ondata is ignored because there is no block definition (block=...') in its TBS tag.

•  <div>[blk1.firstname;block=div] ... [blk1.subname;block=div;ondata=my_function]</div> Bad : parameter ondata is ignored because a previous block definition (block=div) has been taking in acount. Don't forget that only one parameter block= is enougth for each section of a block (two with explicit syntax).

•  <div>[blk1.firstname;block=div;ondata=my_function] ... [blk1.subname]</div> Good : Block parameters are placed together.

Some [onload] blocks are never displayed despite the when statement

A usual mistake is when you put TBS a field linked to a block inside the conditional statement of an [onload] tag. Remember that an [onload] tag is automatically processed as soon as you call the LoadTemplate() method. Therefore, no TBS field of block is merged yet because no MergeBlock() method has been called before.

Example :

•  <div>[onload;block=div;when [blk1.colmun]=3] ... </div> Bad : The TBS fields [blk1.colmun] is not yet merged before calling LoadTemplate() TBS is just checking is string [blk1.colmun] is equal to string 3. Which is always false.

•  <div>[onshow;block=div;when [blk1.colmun]=3] ... </div> Good : TBS field [blk1.colmun] can be merged before calling Show().

The merge is too slow

TinyButStrong is a Template Engine which has good merging performance. Just a bit faster that Smarty or other without template compilation. Like for any Template Engine, the speed of your merge depends a lot on your template's structure. Here are some advices for optimizing your templates.

spot Don't multiply automatic fields [onshow]. It means that you'd better not put [onshow] TBS fields inside some sections of your template that will be merged with MergeBlock(). Otherwise, the number of [onshow] fields will be increased before to be merged ([onshow] fields are processed when Show() method is called). This can slow down your merging very much.


spot For the same reason, don't multiply Var fields or other TBS fields that could be evaluated only once before a block is merged.


spot Use parameter selected with parsimony (not too much). This parameter is quite smart but it needs HTML analyse processes. Such processes cost certain execution time. This is not sensible if they are not numerous, but they can slow down the merge when they are much.


spot When your template has many complex dynamic parts, it is better to migrate the conditional statements from the HTML side to the PHP side.

Change Log

↑ top

Version 3.11.0, on 2019-02-10

New features:
New feature New method GetAttValue($Name[,$delete]) : enables you to read an attribute of an HTML or XML element in the template.
New feature New method ReplaceFields(array($name=>$prms) [, $BlocName]) : replace simple TBS fields with new definitions of fields.
New feature New parameter 'combo' : apply a set of parameters defined at the PHP side using SetOption('prm_combo').
Enhancements:
Enhancement Subnames for fields, array queries and ObjectRef path can support methods overloaded with magic function _call().
Fixed bugs:
Fixed bug PHP error: one meth_Misc_Alert() called with a wrong number of arguments.

Version 3.10.1, on 2015-12-03

Enhancements:
Enhancement Coding OnCacheField event in a plug-in: stronger way to manage embedding fields + support property DelMe.
Fixed bugs:
Fixed bug Coding OnCacheField event in a plug-in: in some circumstances, moved locators may be ignored by TBS. Could happen with OpenTBS when using parameter "ope=tbs:num" or a similar operator.

Version 3.10.0, on 2015-11-08

New features:
New feature New operator "*" for block definition syntax. Example: "block=3*tr".
New feature New operator "!" for block definition syntax. Use it on first or last tag in order to exclude the tag from the block bound. Example: "block=!div".
New feature New marker "." for block definition. Use it to represents the bound of the TBS field itself. Example: "block=.".
New feature New arguments $LocLst and $Pos for the event OnCacheField. It enables a plug-in to move, add or delete TBS fields.
New feature Support SQLite3 in native.
Enhancements:
Enhancement Parameter "parallel=tbs:table" now supports <tbody>, <tfoot>, <colgroup> and <col>. The <col> tags must be closed even if HTML actually allows unclosed tags.
Enhancement Better management of fields moved in a set of other fields, when using parameter "att". Parameter "att" can make a TBS field moving forward another of the same block.
Enhancement Support GetOption('parallel_conf').
Enhancement Support GetOption('block_alias').
Fixed bugs:
Fixed bug Parameter "att" does not find the self-closing tag if there is no space before "/>". Example :<input/>
Fixed bug "Notice: Undefined property: clsTbsLocator::$AttName" can occurs if parameter "atttrue" is used for an attribute which is not already present in the target element.
Fixed bug Parameter "ope=upperw" works only with lower case characters.
Fixed bug Error message "Notice: Undefined property: clsTbsLocator::$AttName in tbs_class.php on line 1492".

Version 3.8.2, on 2013-04-20

New features:
New feature New option "methods_allowed" for allowing methods on automatic fields.
Fixed bugs:
Fixed bug Explicit error message when a column is missing for a grouping parameter (headergrp, footergrp, splittergrp)

Version 3.8.1, on 2012-04-01

Fixed bugs:
Fixed bug Plugin MergeOnFly: debug mode was activated by default.
Fixed bug Error with PHP 5.4 : Unexpected PHP error [Array to string conversion] severity [E_NOTICE] in [tbs_class.php line 72]

Version 3.8.0, on 2012-03-04

New features:
New feature New property VarRef: enables you to redefine the scope of automatic fields ([onshow], [onload] and [var])
New feature New data source supported in native: Zend DB Adapter
New feature New methods SetOption() and GetOption(): hamonize the management of TBS options.
New feature Option "include_path": enables you to define include paths for templates and sub-templates.
New feature Option "block_alias": enables you to define alias of block.
New feature Option "tpl_frms": enables you to define TBS formats.
New feature parameter 'frm' now supports the thousand seperator with several characters. Useful for HTML entites for example.
New feature New values supported by parameter "ope": upper, lower, upper1, upperw, utf8
New feature New parameters store and storename: enable you to bufferize the content of a sub-templates in a store, that you can replace anywhere in the main template using [onshow..store]. Usefull for developping sub-templates as components.
New feature New special field [onshow..php_info]: insert the php info.
Enhancements:
Enhancement New property ExtendedMethods: enables plug-in coders to add new TBS methods (PHP 5 only)
Enhancement Parameter magnet=# is supported even if parameter att is not used.
Enhancement Parameter enlarge is a new alias of parameter comm
Enhancement Parameter getpart is a new alias of parameter getbody
Enhancement Parameter strconv is a new alias of parameter htmlconv
Fixed bugs:
Fixed bug A string [] appears in the contents when parameter "att" is used with a "parentgrp" block.
Fixed bug using parameter getbody : Notice: Trying to get property of non-object in ...\tbs_class.php on line 3775
Fixed bug with PHP 4 (who use it?): PDO::FETCH_ASSOC is not recognized

Version 3.7.0, on 2011-03-18

New features:
New feature Support MySQLi connectivity in native.
New feature Support PDO connectivity in native.
New feature MergeBlock() accepts a new argument for Query parameters.
New feature Method PlugIn() support direct commands.
New feature New internal method meth_PlugIn_SetEvent() for enable/disable a plug-in's event.
New feature New f_Xml_FindTagStart() which can be useful for plug-ins and external tools (yet used in OpenTBS and Excel plug-in)
Enhancements:
Enhancement Better management of fields put in cache when parameter att is used.
Fixed bugs:
Fixed bug Internal method f_Xml_AttFind() does not find attributes that have uppercase characters, that's because f_Loc_PrmRead() save attributes lowercase.
Fixed bug Internal method f_Misc_GetFile() founds the correct size using fstat().
Fixed bug The special automatic field [onshow..template_date] now call f_Misc_GetFile() in order to be sure to found the file the same way.
Fixed bug Parameter mtype=*m or mtype=m* does't use encapsulation level. Now it can find <br />.
Fixed bug When parameter ondata is used on a array string then $CurrRec is not an array. "Warning: Cannot use a scalar value as an array in [...]"
http://www.tinybutstrong.com/forum.php?thr=2673

Version 3.6.1, on 2010-10-29

New features:
New feature Automatic subblocks can now be direct, i.e without a column.
Fixed bugs:
Fixed bug MergeBlock() with 'text' source doesn't work with multiple blocks.
http://www.tinybutstrong.com/forum.php?thr=2569
Fixed bug Parameter rename (to be used with parameters file or script) doesn't rename fields that have no subname or parameter.

Version 3.6.0, on 2010-09-14

New features:
New feature New keyword htmlconv=utf8: enables you to directly convert the data item into UTF-8.
New feature New operator msk: apply a mask on the current data item. Example; ope=msk:prefix_*_suffix
New feature New plugin event OnCacheField, it's triggered when a field is put in the cache of a block definition.
New feature New properties OnLoad and OnShow: enable you to prevent the processing of automatic fields and blocks. May be useful for plug-ins
New feature New parameter atttrue (mean "attribute true"). To be used with parameter att. Turn the attribute to have a Boolean behavior, which becomes true for the given value. Example: [var.x;att=input#selected;atttrue=29] will add "selected=selected" if $x=29, otherwise the attribute is omitted.
New feature TBS can now restrict the PHP functions allowed for parameters ondata and onformat.
Example: $TBS = new clsTinyButStrong('','','f_allowed_');
New feature Automatic subblocks now support optional columns. The column is optional if is defined with parenthesis. If the optional column is missing then the subblock is considered as empty.
Example: [author;block=tr;sub1=(books)]
Fixed bugs:
Fixed bug Parameter getbody without value is not working.
Fixed bug Parameter att doesn't work when placed in inside the target tag and before the target attribute. http://tinybutstrong.com/forum.php?msg_id=10899
Fixed bug GetBlockSource() with arguments AsArray=false and DefTags=false does ignore DefTags=false.
Fixed bug If an automatic subblock has a null value instead of nodata then it displays "TinyButStrong Error when merging block [xxx_sub1] : unsupported variable type : 'NULL'.". This bug is now fixed and a null value means an empty subblock.
Fixed bug A subblock with a dynamic queries can display "TinyButStrong Error when merging block" (with the keyword %p1% in the query) when it founds parameter "p1=" without value. This can happen for instance when the main block had a null or empty value for the linked column.
Fixed bug Parameter valsep (to be used with ope=list) doesn't work as expected if its value is HTML/XML encoded. The final value includes re-encoded value separators.

Version 3.5.3, on 2010-04-12

Fixed bugs:
Fixed bug "Notice : Undefined property: clsTbsLocator::$RightLevel". This warning message appeared in TBS 3.5.2 when you use block=_ .

Version 3.5.2, on 2010-04-08

New features:
New feature XML/HTML single tags <x/> are now considered like <x></x>. Thus, coding "block=img" will work correctly if the TBS fields is embedded in the <img/> tag. Example: <img [b;block=img] />
New feature Parameter frm supports leading zeros. Example: frm=00. (idea submitted by Jérémy)
New feature New parameter maxutf8 allows the max operator to work with utf8 data. (idea submitted by Jérémy)
Example: [onshow.x;ope=max:10;maxutf8]
New feature New operator mok (means Magnet OK). To be used with parameter magnet. Example: [onshow.x;magnet=div;ope=mok:xxx]. The TBS field is never displayed, but the magnet tag is displayed only if the TBS field’s value is xxx. Otherwise, the magnet tag is deleted.
New feature New operator mko (means Magnet KO). Same as mok but the magnet tag is deleted only if the TBS field’s value is xxx.
New feature New keyword: htmlconv=url enables you to formate a string to be instered in URL.
Enhancements:
Enhancement Deleting an attribute using magnet=# does no longer add a new space in the tag.
Enhancement f_Xml_FindTag() is a bit faster.
Enhancement Some code embellish.
Fixed bugs:
Fixed bug Defining a block on a single tag using "block=tag/" doesn’t work. TBS did not manage the embedding level correctly.
Fixed bug "Warning: Parameter 4 to ... expected to be a reference, value given"
Error message when using a plugin event OnFormat or an onformat custom function that use the argument $TBS. Happens only since PHP => 5.3.0. (bug reported by Jérémy)
Fixed bug The virtual column $ returns the record num instead of the item key when calling MergeBlock with a datasource which is an ArrayIterator. (bug reported by Jérémy)
Fixed bug MergeField('onload'), MergeField('onshow') and MergeField('var') produce a TBS error message about property Assigned. This bug has appeared since TBS 3.5.0. (bug reported by Achille)
Fixed bug Parameter ope=nif is not working when the value to merge is not a string. (bug found by Figo)

Version 3.5.1, on 2009-12-08

New features:
New feature New parameter rename to change the name of TBS blocks and fields when a subtemplate is insterted.
Fixed bugs:
Fixed bug

Support block definitions on XML tags that can be either single or opening/closing couple. Since XHTML, tags such as <div /> are allowed. Now they make no error to found the bounds a TBS blocks when such tags are used.
Example: <div> <div /> [onload;block=div] </div>

Fixed bug

When a XML/HTML attribute was not correctly ended the TBS could produce an infinite loop under some circumstances.   For example when using parameter att, or with plug-in HTML.

Fixed bug $TBS->TplVars was erroneously cleared when $HtmlCharSet='+'.
Fixed bug New way of checking PHP version.

Version 3.5.0, on 2009-11-12

New features:
New feature New parameter att. This is a powerful feature that moves a field inside an XML/HTML attribute before to merge it. Parameter attadd makes the merged value to be added to the current attribute's value instead of replace it.
New feature New property Assigned to prepare data to be merged manually or automatically with MergeBlock() and MergeField().
New feature MergeBlock() allows automatic subblocks. When the source of the data has a column containing subdata, then it is possible to define a subblock that will be merged automatically without needing an extra MergeBlock().
New feature Method MergeBlock() natively supports Iterator, ArrayObject and IteratorAggregate. (PHP 5 only)
New feature New special var field [var.error_msg] which displays TBS error messages in your template when property NoErr=true.
Enhancements:
Enhancement MergeField() allows to define a set of default parameters.
Example: $TBS->MergeField('mf',date('Ymd'),false,array('frm'=>'dd/mm/yyyy'));
Enhancement Parameter getbody can now retrieve several parts of the subtemplate, including tags or not.
Example: [onload;file=;getbody=(script)+(style)+body]
Enhancement MergeBlock() allows columns names with spaces.
Enhancement GetBlockSource() allows to delete the block source or to replace it with a string.
Enhancement Method LoadTemplate() supports a Charset argument that is an array.
Security
Fixed bug Security fix: automatic fields ([onload], [onshow] and [var]) are not allowed to call object's methods unless property $TBS->MethodsAllowed is set to true.
Fixed bugs:
Fixed bug Fatal error: Call to undefined method clsTbsDataSource::f_Misc_CheckArgLst().
Fixed bug Notice: Undefined property: clsTinyButStrong::$_PlugIns_Ok_save
Notice: Undefined property: clsTinyButStrong::$_piOnFrm_Ok_save
Fixed bug Fix a potential problem about respecting plugin syntax: plugin's events OnFormat and OnOperation.
Fixed bug Warning of 2 undefined variables. See http://tinybutstrong.com/forum.php?msg_id=9265
Fixed bug Parameter mtype doesn't work properly when use with ope=minv. See http://www.tinybutstrong.com/forum.php?msg_id=9814
Fixed bug The merging process doesn't found a property added manually on the instance of an objet. See http://www.tinybutstrong.com/forum.php?msg_id=9508
Fixed bug A template format with numerical definition can not be displayed correclty.
Miscellaneous:
  TBS is under the LGPL license version 3 instead of 2.1

Version 3.4.0, on 2008-05-30

New features:
New feature New parameter tplfrms to create template formats. Template formats are TBS format for date and number which is defined once and can be references by its name.
Example: [onload;tplfrms;doll=$ 0,000.00] ... [var..amount;frm=doll]
New feature New keyword (locale) for date formats. Insert this keyword inside a date format in order to specify that the formatting must use the loclae settings.
Example: [var.date;frm=(locale)mmmm yyyy]
It does the same as the seperated parameter locale which becomes deprecated.
Fixed bugs:
Fixed bug Avoid infinite loops when a subblock meets an SQL error.
Fixed bug Bad condition evaluation when the first element contains the symbol equal (=). Now it can be escaped with single quote (').
Fixed bug Now, LoadTemplate(null,HtmlCharset) do run Plugins, Onload and HtmlCharset without changing the template, like the documentation says.
Fixed bug Now, LoadTemplate('',HtmlCharset) do change HtmlCharset without changing the template, like the documentation says.
Fixed bug Now, formatted dates with the locale option are converted with the HtmlCharset of the template. This is because they may have accents.

Version 3.3.0, on 2008-02-29

New features:
New feature LoadTemplate('',$charset) set the charset without changing the current template.
This enables you, for example, to load a template from a string and then set the relevant chartset.
New feature New plug-in event: OnMergeGroup.
It occurs when a header, a footer or a splitter is merged.
New feature Parameter ope=nif:xxx replaces the value with null when it's equale to xxx.
It's a shortcut for [val]='xxx';then '';.
New feature Parameter ope=minv makes parameter magnet work properly but turns the final value to be null.
This i a way to make invisible fields which can manage magnets stuffs.
Enhancements:
Enhancement Paremeters headergrp, parentgrp and footergrp work for any kind of data source (array, object, ...) and also with sub items. You can even use the virtual columns # and $.
Example: [blk;block=tr;headergrp=#] or [blk;block=tr;headergrp=ident.name]
Enhancement Fields in the conditional clause of a section are also cached.
Enhancement Templates and subtemplates are also searched in include_path.
Enhancement Custom functions for LoadTemplate support a new argument to process newline characters.
Enhancement MergeField('onload') also merges variable fields such as [onload.x].
Enhancement MergeBlock('blk','cond') also merges var fields such as [blk.x] and [blk;file=...] just like [onload] and [onshow] do.
Enhancement The code source has no more plublic functions.
Fixed bugs:
Fixed bug Wrong merging when a block is using parameter "p1" and having a field outside the block.
See related topic
Fixed bug Now [var..now] uses time() instead of mktime().
See related topic
Fixed bug Now there is a TBS error message when [onload;block=...] doesn't found the block which is defined.

Version 3.2.0, on 2006-11-27

New feature New feature: Onload [var] fields.
Now a field like [onload.x] can display a PHP variable $x as soon as the template is loaded. It is very useful for optimization.
New feature New feature: special var field [var..cst.*]
Display a PHP constant.
New feature New feature: special var field [var..tbs_info]
Display some information about TBS version, PHP version and installed plug-ins.
New feature New feature: enhancement for parameter ope.
Parameter ope can have several operations. It supports real values, and two new operations : div and mul.
Example : [var.x;ope=mul:2,add:1.5]
New feature New feature: enhancement for files.
The LoadTemplate() method, and both parameters file and script also look their file in the directory of the last opened template. It can be useful to simplify subtemplate inclusion.
New feature New feature: new time formats.
- h for hour-24 without the leading zero,
- rr for hour-12 with the leading zero,
- r for hour-12 with the leading zero,
hm becomes deprecated. You cannot use double quote (") as a string delimiter in date-time formats anymore, only simple quote (').
New feature New feature: undocumented property ErrCount.
Incremented when a TBS error is met.
New feature New feature: undocumented property RecheckObj.
Enhancement Optimization: The class is smaller and faster than previous versions.
Enhancement Enhancement: Some error messages are clearer.
Fixed bug Fixed bug: an extra empty line could be displayed when using parameter serial and headergrp in the same block.
Fixed bug Fixed bug: Warning: Missing argument 3 for tbs_misc_getfile()
This message could appear under certain circumstances.
Fixed bug Fixed bug: Bad eror message could be prompted when a custom function fail to open a query.
Fixed bug Fixed bug: Problems when another script create functions array_key_exists() and property_exists() before TBS does.
Fixed bug Fixed bug: An unwanted extra line could be added when parameter block=_ was used on a TBS tag placed on the very beginning of a line.
Fixed bug Fixed bug: HTML attribute not recognized when glued to the bottom of its tag.
Example : <input value="1"/> could be not recognized.
+ Internal change: Code optimized for block analysis.
$LocR structure modified (undocumented, this is for plug-in developers).
+ Internal change: Code optimized for custom function check.
You can now preload a custom function set associated with a keyword. (undocumented).

Version 3.1.1, on 2006-06-25

Fixed bug Fixed bug: Bad result when using parameter magnet with mtype=*m
In TBS 3.1.0 a field using this value was always bad processed.

Version 3.1.0, on 2006-06-13

New feature New feature: block=_
Now you can define a block to be the file line on which the TBS tag is defined. This feature recognizes Linux, Mac and Windows new-line chars. Among other things, this can be useful when you're working on text files.
It also works for extending blocks. Example : block=_+(_)+_ or block=span+_
New feature New feature: block=tag/
By adding character / at the end of the tag's name, TBS won't retrieve the closing tag. The block will be defined on the single openning HTML tag which contains the TBS tag. This can be useful to multiply an image for example.
Fixed bug Fixed bug: Bad merged blocks when using a definition like block=tag+tag
TBS could make a confusion on block's limits when using a block's definition containing several tags with common names.
Fixed bug Fixed bug: TinyButStrong Error: item ... is neither a method nor a property in the class ...
This message could happen when a TBS field tryied to display the an object's property having a null value. Now the null value is corretly taken in acount, but because of PHP restrictions, undefined properties won't produce a TBS error anymore with PHP version lower than 5.1.0.
Fixed bug Fixed bug: The plug-in event Ondata started before event BeforeMergeBlock.
Now BeforeMergeBlock event always start before Ondata.
Fixed bug Fixed bug: Notice: Undefined offset:  0 in ... on line ...
This message could happen when you tried to merge a block that have special sections (like serial or headergrp) but no normal sections. Such blocks can now be merged without error message.
Fixed bug Fixed bug: Variables $CurrVal and $CurrPrm not available when using parameter script.
Those variables were mentioned in the manual but not available. Now they are.
Fixed bug Fixed bug: Error message: pg_fetch_array(): Unable to jump to row ...
This could happens under misterious circumpstances when using PostgreSQL and PHP 5.
Fixed bug Plug-in HTML and ByPage need to be upgraded to works with TBS 3.1.0

Version 3.0.6, on 2006-05-26

Fixed bug Fixed bug: error when using MergeBlock() with objects.

Version 3.0.5, on 2006-05-22

Fixed bug Fixed bug: date formated displays 1st jan 1970.
This could occur with PHP 5.1.0 or higher and with a value which is a timestamp. This is because since PHP 5.1.0, the function strtotime() returns false instead of -1 for a bad time value.
You have a description of the problem in the forum.

Version 3.0.4, on 2006-05-15

Fixed bug Fixed bug: Problems with data or variables when using the TBS syntax for subitems.
Some data change could occur in some circumstances:
- [var] fields calling an object's method
- Array dynamic queries calling an object's method or property
- Parameter onformat or ondata calling an object's method or property

Version 3.0.3, on 2006-05-14

Fixed bug Fixed bug: Error message Warning: Missing argument 1 for aftershow() in ...
This could happen when a plug-in is installed in a sub-template script (called by parameter script).
Plug-in CacheSystem has been changed too in order to feet with this fix.

Version 3.0.2, on 2006-05-13

Fixed bug Fixed bug: Bad argument supplied to plug-in's event OnMergeField.
Fixed bug Fixed bug: Problems with plug-in's event AfterShow.
Now Ouput and Exit happens after event AfterShow. You can cancel them using argument $Render.
Plug-in CacheSystem has been changed too in order to feet with this fix.
+ Comments in the file tbs_plugin_syntaxes has been uptated.
Fixed bug Fixed bug: [var] fields embedded into a parameter 'script' were not merged.

Version 3.0.1, on 2006-05-10

Fixed bug Fixed bug: [var] fields embedded into a parameter 'script' were not merged.

Version 3.0, on 2006-05-03

New feature Lot of new features, see document [What's new with TBS 3.0]

backup Changelog for TBS 2.x is backuped here.

backup Changelog for TBS 1.x is backuped here.

License

↑ top

TinyButStrong is released under the LGPL (Lesser General Public Licence).

In summary it means that:

Read other terms and conditions at the LGPL offical web site.

Contact

↑ top

For questions, help, how to, bug reports, comments... contact us.