Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

Smarty 3 RC3 released
Goto page Previous  1, 2, 3  Next
 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Smarty 3
View previous topic :: View next topic  
Author Message
Jerc
Smarty Rookie


Joined: 26 Jan 2010
Posts: 30
Location: Slovenia / Ljubljana

PostPosted: Mon Aug 02, 2010 8:28 am    Post subject: Reply with quote

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
View user's profile Send private message
U.Tews
Administrator


Joined: 22 Nov 2006
Posts: 5068
Location: Hamburg / Germany

PostPosted: Mon Aug 02, 2010 4:39 pm    Post subject: Reply with quote

Strip did not work correctly or all cases in conjunction with comment lines.

The fix is in the SVN now.
Back to top
View user's profile Send private message
logistiker
Smarty n00b


Joined: 03 Aug 2010
Posts: 2

PostPosted: Tue Aug 03, 2010 10:04 pm    Post subject: rename Smarty.class.php to Smarty.php Reply with quote

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
View user's profile Send private message
mohrt
Administrator


Joined: 16 Apr 2003
Posts: 7368
Location: Lincoln Nebraska, USA

PostPosted: Tue Aug 03, 2010 10:07 pm    Post subject: Re: rename Smarty.class.php to Smarty.php Reply with quote

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
View user's profile Send private message Visit poster's website
logistiker
Smarty n00b


Joined: 03 Aug 2010
Posts: 2

PostPosted: Tue Aug 03, 2010 10:08 pm    Post subject: Re: rename Smarty.class.php to Smarty.php Reply with quote

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
View user's profile Send private message
douglassdavis
Smarty Junkie


Joined: 21 Jan 2008
Posts: 541

PostPosted: Wed Aug 04, 2010 1:01 am    Post subject: Re: rename Smarty.class.php to Smarty.php Reply with quote

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
View user's profile Send private message
reign.santiago2
Smarty n00b


Joined: 06 Aug 2010
Posts: 3

PostPosted: Fri Aug 06, 2010 12:25 pm    Post subject: Reply with quote

This is good to know a smarty 3. But I am thinking it would be work in some app.
Back to top
View user's profile Send private message
jkachlik
Smarty n00b


Joined: 08 Aug 2010
Posts: 1

PostPosted: Sun Aug 08, 2010 10:54 am    Post subject: developer plane... for smarty 3 Reply with quote

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
View user's profile Send private message
Mastershrimp
Smarty Regular


Joined: 21 Dec 2009
Posts: 53

PostPosted: Mon Aug 09, 2010 6:58 am    Post subject: Reply with quote

I think they're working on that Wink
Back to top
View user's profile Send private message
Vultapher
Smarty n00b


Joined: 20 Aug 2010
Posts: 3

PostPosted: Fri Aug 20, 2010 8:00 am    Post subject: Reply with quote

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 Smile
Back to top
View user's profile Send private message
U.Tews
Administrator


Joined: 22 Nov 2006
Posts: 5068
Location: Hamburg / Germany

PostPosted: Fri Aug 20, 2010 12:05 pm    Post subject: Reply with quote

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
View user's profile Send private message
legende
Smarty n00b


Joined: 17 Jan 2010
Posts: 3

PostPosted: Sat Aug 21, 2010 12:36 pm    Post subject: Feature request: cache_id attribute for include template Reply with quote

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
View user's profile Send private message
U.Tews
Administrator


Joined: 22 Nov 2006
Posts: 5068
Location: Hamburg / Germany

PostPosted: Sun Aug 22, 2010 12:18 pm    Post subject: Reply with quote

The SVN has been updated.

The cache_id attribute has been added to the {include} tag.
Back to top
View user's profile Send private message
Vultapher
Smarty n00b


Joined: 20 Aug 2010
Posts: 3

PostPosted: Mon Aug 23, 2010 8:07 am    Post subject: Reply with quote

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 Smile

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 Smile
Back to top
View user's profile Send private message
kisanetik
Smarty n00b


Joined: 23 Aug 2010
Posts: 1

PostPosted: Mon Aug 23, 2010 10:47 am    Post subject: Hi, have extends problem Reply with quote

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
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Smarty 3 All times are GMT
Goto page Previous  1, 2, 3  Next
Page 2 of 3

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP