your opinion on a new way for explaing [onload] [onshow] [var] tags

33 views
Skip to first unread message

Skrol29

unread,
Aug 3, 2009, 9:34:34 AM8/3/09
to tbs-...@googlegroups.com

Hello,

 

TBS 3.5.0 RC seems to be stable. The final relased is closed. I recently spend times to rewrite some parts of the documentation that was talking about [onload], [onshow] and [var] fields. I'd like your opinion (no need to reply immediately) about the new way the documentation and the examples are explaining the things. It is sum up below.

 

At first there was only [var] fields. Since TBS 3.2.0 there are also [onload] and [onshow] fields and blocks. Since I inserted those two types of tags, the idea was to make [var] fields more flexible and comprehensive. It was not clear in tha manul that [onload.x] and [onshow.x] could merged the PHP variable $x.

 

How it was explained before:

 

[var] fields can merge PHP variables, they are merged when method Show() is called, and they are also merged on some specific parameters (file, script, if, then, else, when). [onload] tags are merged when Loadtemplate() is called, and [onshow] tags are merged when Show() is called and they both can be merged as conditional blocks.

The summary of the features is:

- Merged when LoadTemplate() is called : [onload] 

- Merged when Show() is called : [onshow] + [var]
- Merged when parameters {file, script, if, then, else, when} are processed : [var]

 

How it was explained now:

There are automatic fields (onload, show and var) and automatic blocks.


* Automatics fields can merge PHP variables:
- [onload.x] merges $x when LoadTemplate() is called.
- [onshow.x] merges $x when Show() is called.
- [var] fields are used to merge PHP variables embedded into some parameters (file, script, if, then, else, when). They are also merged when Show() is called, but this is only for compatibility. It is better to use [onshow.x].

* Automatics block can be [onload] or [onshow].

 

Feel free to read more on the online documentation which is already updated. The examples have also been updated by replacing most of [var] fields into [onshow] fields. I’d be glad if you could send your feeling and impression about this new way of explain things. Take time to think what is like to use [onload.x] and [onshow.x] instead if [var.x]. Fell free to send critics.

 

Regards,

------------------------
Skrol29
------------------------
 

TomH

unread,
Aug 3, 2009, 10:29:34 AM8/3/09
to tbs-...@googlegroups.com
Skrol29,

I can see how the new explanation is much more useful,
especially for newer users of TBS.

Great work as usual.

All the best,
TomH

PirjoP

unread,
Sep 4, 2009, 8:20:06 AM9/4/09
to TinyButStrong Next Version
Skrol29,

I agree with TomH that the new way of explaining [onload] [onshow]
[var] tags is great!
However, for newer users I would add one more line in the manual in
the Automatic fields section above this line:

An automatic field without sub name will be merged with an empty
string value ('').

The line would explain what you mean by "sub name", because the
examples come a few lines later.
The line could be something like:

Automatic fields may or may not have a sub name, like x in
[onload.x], [onshow.x] or [var.x].

PirjoP,
a fan of TBS since 2004

TomH

unread,
Sep 4, 2009, 9:06:34 AM9/4/09
to tbs-...@googlegroups.com

Yes to PirjoP's nice addition - and even for the not so new ;)

PirjoP wrote:
> Skrol29,

Skrol29

unread,
Sep 7, 2009, 11:59:20 AM9/7/09
to tbs-...@googlegroups.com

Hi Pirjo,

I've made the changes you suggested.

It's always a pleasure to hear from you :)
---------------------
Skrol29
www.tinybutstrong.com
---------------------

-----Message d'origine-----
De : tbs-...@googlegroups.com [mailto:tbs-...@googlegroups.com] De la part
de PirjoP
Envoyé : vendredi 4 septembre 2009 14:20
À : TinyButStrong Next Version
Objet : [tbs-next] Re: your opinion on a new way for explaing [onload]
[onshow] [var] tags

Reply all
Reply to author
Forward
0 new messages