Categories > TinyButStrong general >

Onshow not Show

The forum is closed. Please use Stack Overflow for submitting new questions. Use tags: tinybutstrong , opentbs
By: Martin
Date: 2008-06-20
Time: 11:22

Onshow not Show

Hi Skrol!
I have a variable, named, $warnings='', this variable start empty and if any warning occur in the process, fill with messages. One of this message was:
http://xxxxx/SGDGENERICO/View.do?queryString=/MAT_PRODUCTO[@MP_DOCID=%225732008-06-20-11.13.09.528001%22]

In my template i have this code to show it, when not is empty this variable:
<div class="infobox warning">[onshow;block=div;when [var.warning]!='']
<p>[var.warning;htmlconv=no]</p>
</div>

I dont know why, but no show it. If the variable text (clean) works greats, but when i have a url into the variable, nothing show it.

I test with a function, like, "onformat=f_urldecode" and nothing...

Perhaps if i replace some characters before and onformat again replace this characters for originals... i dont know.

Thanks a lot !
By: Martin
Date: 2008-06-20
Time: 12:11

Re: Onshow not Show

Hi Skroll!
The solution was replace the "=" to any other character, like * and onformat replace again. My opinion, the problem was generated in this line
[onshow;block=div;when [var.warning]!='']

Because when TBS merge, and the variable [var.warning] have a "=" cut the sentence...

Thanks Martin
By: Skrol29
Date: 2008-06-21
Time: 14:39

Re: Onshow not Show

Hi Martin,

If the variable $warning may have a '=', you should code
[onshow;block=div;when '[var.warning]'!='']
This works with TBS >= 3.4.0 because a small bug has been fixed about it.

Nevertheless, can can do the same more simply using parameter "magnet".
By: Martin
Date: 2008-07-01
Time: 13:44

Re: Onshow not Show

Hi Skroll! Thanks, works greats...

Now i have a aa URL into my database like

http://xxxxx/SGDGENERICO/View.do?queryString=/MAT_PRODUCTO[@MP_DOCID=%225732008-06-20-11.13.09.528001%22]

I want to print this link in a
<a href="[archivos.URL;htmlconv=no]"

but TBS replace the [ with


Thanks a lot !!!

Martin
By: Skrol29
Date: 2008-07-02
Time: 18:53

Re: Onshow not Show

Yes, it is mentioned in the FAQ.
[ are replaced with &#91;
You have to add "protec=no" to avoid this on a field.