Categories > TinyButStrong general >

frm wrong format. Regional Settings ?

The forum is closed. Please use Stack Overflow for submitting new questions. Use tags: tinybutstrong , opentbs
By: Martin
Date: 2010-02-19
Time: 16:41

frm wrong format. Regional Settings ?

Hi Skrol29,

Im have a problem with frm function. This is the first time, so i think its something in my computer, because when i code this
[var..now;frm='dd/mm/yyyy']

Show me this

19//02//2010

The same if i write

[onshow..now;frm='dd/mm/yyyy hh:nn:ss']

Show me this

19//02//2010/ 16/:35/:09

It escaping character '/'. My charset is set to "iso-8859-1", OS:WinXP SP 3, and browsing via IE 8. Version  : 3.5.0 for PHP 5, Date: 2009-11-12


Thanks a lot Skrol29 !
By: Skrol29
Date: 2010-02-19
Time: 17:24

Re: frm wrong format. Regional Settings ?

Hi,

How strange!
Can you check your HTML snippet from the very source?
By: Martin
Date: 2010-02-19
Time: 21:56

Re: frm wrong format. Regional Settings ?

Hi Skrol29,

Yes, its very strange! This is the template code.

I test it in Linux CentOS, and its the same strange output...

                    <div class="slide">
                      <p class="left" style="text-align:center;width:175px;margin-right:2px;height:320px;">
                        <a href="[var.conf.site_url]noticia/[slider_noticias_1.id;block=p;]/[slider_noticias_1.titulo;onformat=phpfunc;fct=url_amigable;]" title="Leer Noticia" alt="Leer Noticia"><img src="[var.conf.site_url]img/noticias_h120/[slider_noticias_1.imagen]" title="[slider_noticias_1.titulo;onformat=phpfunc;fct=ucfirst]" alt="[slider_noticias_1.titulo;onformat=phpfunc;fct=ucfirst]" height="120" /></a><br />
                        <span class="gris">[var..now;frm='dd/mm/yyyy']</span><br />
                        <span style="display:block;padding:10px;text-align:justify;">[slider_noticias_1.texto;onformat=phpfunc;fct=clear;ope=max:200;maxhtml;maxend='...';.]</span>
                      </p>
                      <p class="left" style="text-align:center;width:175px;margin-right:2px;height:320px;">
                        <a href="[var.conf.site_url]noticia/[slider_noticias_2.id;block=p;]/[slider_noticias_2.titulo;onformat=phpfunc;fct=url_amigable;]" title="Leer Noticia" alt="Leer Noticia"><img src="[var.conf.site_url]img/noticias_h120/[slider_noticias_2.imagen]" title="[slider_noticias_2.titulo;onformat=phpfunc;fct=ucfirst]" alt="[slider_noticias_2.titulo;onformat=phpfunc;fct=ucfirst]" height="120" /></a><br />
                        <span class="gris">[var..now;frm='dd/mm/yyyy']</span><br />
                        <span style="display:block;padding:10px;text-align:justify;">[slider_noticias_2.texto;onformat=phpfunc;fct=clear;ope=max:250;maxhtml;maxend='...';.]</span>
                      </p>
                      <p class="left" style="text-align:center;width:175px;margin-right:2px;height:320px;">
                        <a href="[var.conf.site_url]noticia/[slider_noticias_3.id;block=p;]/[slider_noticias_3.titulo;onformat=phpfunc;fct=url_amigable;]" title="Leer Noticia" alt="Leer Noticia"><img src="[var.conf.site_url]img/noticias_h120/[slider_noticias_3.imagen]" title="[slider_noticias_3.titulo;onformat=phpfunc;fct=ucfirst]" alt="[slider_noticias_3.titulo;onformat=phpfunc;fct=ucfirst]" height="120" /></a><br />
                        <span class="gris">[var..now;frm='dd/mm/yyyy']</span><br />
                        <span style="display:block;padding:10px;text-align:justify;">[slider_noticias_3.texto;onformat=phpfunc;fct=clear;ope=max:250;maxhtml;maxend='...';.]</span>
                      </p>
                      <p class="left" style="text-align:center;width:175px;margin-right:2px;height:320px;">&nbsp;[slider_noticias_0;block=p;][slider_noticias;block=div;serial]</p>
                    </div>
                  </div>

Result of testing.

[var..now]
1266612179
[var..now;frm=dd/mm/yyyy]
19//02//2010
[var..now;frm='dd/mm/yyyy']
19//02//2010
[var..now;frm='dd\/mm\/yyyy']
19///02///2010
[var..now;frm='dd-mm-yyyy']
19/-02/-2010


Look this.

With this version,

Version  : 3.2.0 PHP >= 4.0.6
Date     : 2006-11-26

Work Great !

With this version,

Version  : 3.4.0 for PHP 4
Date     : 2008-06-06

Not Work

With this version,

Version  : 3.5.0 for PHP 5
Date     : 2009-11-12

Not Work

Its extrange...
By: Martin
Date: 2010-03-30
Time: 13:39

Re: frm wrong format. Regional Settings ?

Hi Skrol !

I find a solution, but i dont know if this solution affect others functions..

In tbs_class_php5.php - Version: 3.5.0 for PHP 5 - Date: 2009-11-12
in line 2785 - 2792 - 2833 the protect char is "/" and

In tbs_class.php - Version: 3.2.0 for PHP 4 - Date 2006-11-26 in line 2576 - 2583 - 2614 the protect char is "\\"

i change in tbs_class_php5.php the protect char from "/" to
"\\" and now the frm=dd/mm/yyyy show right.

Its extrange...
By: Skrol29
Date: 2010-03-30
Time: 17:40

Re: frm wrong format. Regional Settings ?

Hi,

In the released version 3.5.0, this protected char is defined with '\\' and not "/" as you have.

The released version is still available at the download page, at the section "Old versions" .