View previous topic :: View next topic |
Author |
Message |
Jerc Smarty Rookie
Joined: 26 Jan 2010 Posts: 30 Location: Slovenia / Ljubljana
|
Posted: Mon Aug 02, 2010 8:28 am Post subject: |
|
|
I think, that {strip} function does not work as it should.
My code:
Code: |
{strip}
<form action="goto.php5" method="post">
{* comment *}
<select ....
</form>
{/strip}
|
Smarty 2 outputs:
<form action="goto.php5" method="post"><select ....
Smarty 3 output:
<form action="goto.php5" method="post"> 6 tab spaces <select .... |
|
Back to top |
|
U.Tews Administrator
Joined: 22 Nov 2006 Posts: 5068 Location: Hamburg / Germany
|
Posted: Mon Aug 02, 2010 4:39 pm Post subject: |
|
|
Strip did not work correctly or all cases in conjunction with comment lines.
The fix is in the SVN now. |
|
Back to top |
|
logistiker Smarty n00b
Joined: 03 Aug 2010 Posts: 2
|
Posted: Tue Aug 03, 2010 10:04 pm Post subject: rename Smarty.class.php to Smarty.php |
|
|
Please stop naming the smarty class Smarty.class.php. Please rename it to smarty.php. The smarty filename will then be uniform with sysplugins and it will make it much easier to autoload smarty. |
|
Back to top |
|
mohrt Administrator
Joined: 16 Apr 2003 Posts: 7368 Location: Lincoln Nebraska, USA
|
Posted: Tue Aug 03, 2010 10:07 pm Post subject: Re: rename Smarty.class.php to Smarty.php |
|
|
logistiker wrote: | Please stop naming the smarty class Smarty.class.php. Please rename it to Smarty.php. The smarty filename will then be uniform with sysplugins and it will make it much easier to autoload smarty. |
It probably won't be changing any time soon. Just make a symlink to whatever filename you require. |
|
Back to top |
|
logistiker Smarty n00b
Joined: 03 Aug 2010 Posts: 2
|
Posted: Tue Aug 03, 2010 10:08 pm Post subject: Re: rename Smarty.class.php to Smarty.php |
|
|
mohrt wrote: | logistiker wrote: | Please stop naming the smarty class Smarty.class.php. Please rename it to smarty.php. The smarty filename will then be uniform with sysplugins and it will make it much easier to autoload smarty. |
It probably won't be changing any time soon. Just make a symlink to whatever filename you require. |
So is it going to change? |
|
Back to top |
|
douglassdavis Smarty Junkie
Joined: 21 Jan 2008 Posts: 541
|
Posted: Wed Aug 04, 2010 1:01 am Post subject: Re: rename Smarty.class.php to Smarty.php |
|
|
mohrt wrote: | logistiker wrote: | Please stop naming the smarty class Smarty.class.php. Please rename it to Smarty.php. The smarty filename will then be uniform with sysplugins and it will make it much easier to autoload smarty. |
It probably won't be changing any time soon. Just make a symlink to whatever filename you require. |
another option is to do an require from whatever filename you want. |
|
Back to top |
|
reign.santiago2 Smarty n00b
Joined: 06 Aug 2010 Posts: 3
|
Posted: Fri Aug 06, 2010 12:25 pm Post subject: |
|
|
This is good to know a smarty 3. But I am thinking it would be work in some app. |
|
Back to top |
|
jkachlik Smarty n00b
Joined: 08 Aug 2010 Posts: 1
|
Posted: Sun Aug 08, 2010 10:54 am Post subject: developer plane... for smarty 3 |
|
|
Hi,
rc3 works for me fine on all our testing projects. But is there any plane for Smarty 3 finale version ?..
thx |
|
Back to top |
|
Mastershrimp Smarty Regular
Joined: 21 Dec 2009 Posts: 53
|
Posted: Mon Aug 09, 2010 6:58 am Post subject: |
|
|
I think they're working on that |
|
Back to top |
|
Vultapher Smarty n00b
Joined: 20 Aug 2010 Posts: 3
|
Posted: Fri Aug 20, 2010 8:00 am Post subject: |
|
|
The RC3 looks very fine to me except for one detail:
The html_select_date function can't print valid UTF-8 month names in PHP 5.x windows environments, it happens, for example, with the German name for March, "März". We've added a workaround to libs/plugins/function.html_select_date.php line 197 by changing it from Code: | for ($i = 1; $i <= 12; $i++) {
- $month_names[$i] = strftime($month_format, mktime(0, 0, 0, $i, 1, 2000));
$month_values[$i] = strftime($month_value_format, mktime(0, 0, 0, $i, 1, 2000));
} | to Code: | for ($i = 1; $i <= 12; $i++) {
+ $month_names[$i] = utf8_encode(strftime($month_format, mktime(0, 0, 0, $i, 1, 2000)));
$month_values[$i] = strftime($month_value_format, mktime(0, 0, 0, $i, 1, 2000));
}
| The idea for this workaround originates from comment #98329 to the function "strftime" and it would be nice if this could be integrated into the final release.
Greetings |
|
Back to top |
|
U.Tews Administrator
Joined: 22 Nov 2006 Posts: 5068 Location: Hamburg / Germany
|
Posted: Fri Aug 20, 2010 12:05 pm Post subject: |
|
|
The problem is that Windows does not really support UTF-8. See also http://www.smarty.net/forums/viewtopic.php?t=17267
Modifying the html_select_date plugin is a bad idea because it won't work in environments where you don't want to use UTF-8.
For your case use utf8_encode as modifier.
Code: | {html_select_date|utf8_encode} |
|
|
Back to top |
|
legende Smarty n00b
Joined: 17 Jan 2010 Posts: 3
|
Posted: Sat Aug 21, 2010 12:36 pm Post subject: Feature request: cache_id attribute for include template |
|
|
There are times when you need to assign separate cache_id for include templates. Can you please add this functionality to smarty 3.
{include file='template' cache_id='$special_cache_id'}
Thanks in advance |
|
Back to top |
|
U.Tews Administrator
Joined: 22 Nov 2006 Posts: 5068 Location: Hamburg / Germany
|
Posted: Sun Aug 22, 2010 12:18 pm Post subject: |
|
|
The SVN has been updated.
The cache_id attribute has been added to the {include} tag. |
|
Back to top |
|
Vultapher Smarty n00b
Joined: 20 Aug 2010 Posts: 3
|
Posted: Mon Aug 23, 2010 8:07 am Post subject: |
|
|
U.Tews wrote: | The problem is that Windows does not really support UTF-8. | Yea, we're facing that problem with lacking UTF-8 support here quite often
U.Tews wrote: | Modifying the html_select_date plugin is a bad idea because it won't work in environments where you don't want to use UTF-8. | ...And you have to inspect Smarty updates and port changes from there.
U.Tews wrote: | For your case use utf8_encode as modifier.
Code: | {html_select_date|utf8_encode} |
| Huh yea, didn't think about that. Thanks |
|
Back to top |
|
kisanetik Smarty n00b
Joined: 23 Aug 2010 Posts: 1
|
Posted: Mon Aug 23, 2010 10:47 am Post subject: Hi, have extends problem |
|
|
Just test function:
{if $action eq 'loadTemplateArea'}
{extends file="main/guards/main.tpl"}
...
{/extends}
{/if}
{else}
...
{/if}
But after I get the warning:
Syntax Error in template "/var/www/.../guards/main.tpl" on line ... unclosed {if} tag
And this is the first {if $action eq ...
Is can I do something with that? Is this my bug? |
|
Back to top |
|
|