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 RC4 released
Goto page 1, 2  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
mohrt
Administrator


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

PostPosted: Tue Oct 05, 2010 8:55 pm    Post subject: Smarty 3 RC4 released Reply with quote

The fourth RC of Smarty 3 has been released! Please join the developer mailing list and see the Smarty 3 section of the forums and give us feedback!

NOTE: Documentation for Smarty 3 is still being finalized, please use the README for now.

http://www.smarty.net/
Back to top
View user's profile Send private message Visit poster's website
klappi
Guest





PostPosted: Tue Oct 05, 2010 9:12 pm    Post subject: Re: Smarty 3 RC4 released Reply with quote

good work devs! I will test it right away

mohrt wrote:
The fourth RC of Smarty 3 has been released! Please join the developer mailing list and see the Smarty 3 section of the forums and give us feedback!

NOTE: Documentation for Smarty 3 is still being finalized, please use the README for now.

http://www.smarty.net/
Back to top
X-MAN
Smarty Rookie


Joined: 17 Dec 2005
Posts: 7

PostPosted: Wed Oct 06, 2010 8:59 am    Post subject: Reply with quote

Many thanks for new RC. I will be test it Smile

Do you planing to make final release to end of this year?
Back to top
View user's profile Send private message
juliendusud
Smarty Rookie


Joined: 08 Oct 2010
Posts: 10

PostPosted: Fri Oct 08, 2010 9:22 am    Post subject: Smarty 3 RC4 Reply with quote

hello,

Just I have tried RC4, and I have some bugs. For example :

{section name=id loop=$liste_mails}
<tr style="background-color:{if $liste_mails[id].lu != 'lu'}#adf983{else}{cycle values="#e5e5e5,#d1d1d1"}{/if}">

.....
{/section}

display :


Fatal error: Uncaught exception 'SmartyCompilerException' with message 'Syntax Error in template ".../my_template.tpl" on line 35 " &lt;tr style=&quot;background-color:{if $liste_mails[id].lu != 'lu'}#adf983{else}{cycle values=&quot;#e5e5e5,#d1d1d1&quot;}{/if}&quot;&gt;" unknown tag "cycle"' in /smarty3_rc4/sysplugins/smarty_internal_templatecompilerbase.php:404 Stack trace: #0 smarty3_rc4/sysplugins/smarty_internal_templatecompilerbase.php(229): Smarty_Internal_TemplateCompilerBase->trigger_template_error('unknown tag "cy...', 35) #1 smarty3_rc4/sysplugins/smarty_internal_templateparser.php(2191): Smarty_Internal_TemplateCompilerBase->compileTag('cycle', Array) #2 /data2/julien/clicnlove/sites/lib/smarty3_rc4/sysplugins/smarty_internal_templateparser.php(2623): Smarty_Internal_Templateparser->yy_r38() #3 smarty3_rc4/sysplugins/smarty in smarty3_rc4/sysplugins/smarty_internal_templatecompilerbase.php on line 404
Back to top
View user's profile Send private message
U.Tews
Administrator


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

PostPosted: Fri Oct 08, 2010 1:22 pm    Post subject: Reply with quote

It looks like your $plugins_dir is pointing to wrong location
Back to top
View user's profile Send private message
juliendusud
Smarty Rookie


Joined: 08 Oct 2010
Posts: 10

PostPosted: Fri Oct 08, 2010 4:14 pm    Post subject: Reply with quote

Thanks for your explain.

I have done some velocity test and I found that smarty 3 RC4 is more slower than the stable version. What can I do to improve performance ?

Thanks.
Back to top
View user's profile Send private message
mohrt
Administrator


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

PostPosted: Fri Oct 08, 2010 4:20 pm    Post subject: Reply with quote

how much slower? improving performance for starters:

turn caching on
turn compile_check off

of course you have to be aware of the affect these have on your application, you cannot blindly change them and hope you don't break something.

also profile your implementation, there are too many parameters that can cause performance issues.
Back to top
View user's profile Send private message Visit poster's website
juliendusud
Smarty Rookie


Joined: 08 Oct 2010
Posts: 10

PostPosted: Fri Oct 08, 2010 4:42 pm    Post subject: Reply with quote

If I put setCaching(true) it displays always the same page, but my website was running perfectly with the latest version.
Back to top
View user's profile Send private message
mohrt
Administrator


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

PostPosted: Fri Oct 08, 2010 4:46 pm    Post subject: Reply with quote

you probably want a separate cache_id per page you want cached. this takes some understanding of smarty and caching.
Back to top
View user's profile Send private message Visit poster's website
newbie78
Smarty Rookie


Joined: 11 Oct 2010
Posts: 6

PostPosted: Mon Oct 11, 2010 12:24 pm    Post subject: Reply with quote

hi! thanks for great job!

i migrate from ver2 to ver3
if after condition in the if tag we have space symbol we get an error

smarty-code
Code:

{if  $arrPrj.flg_status>=$arrStatus.pending }disabled=""{/if}


php-error
Code:

message: " , "}" , "*" , "/" , "%" , "+" , "-" , ""&"" , ISIN , ISDIVBY , ISNOTDIVBY , ISEVEN , ISNOTEVEN , ISEVENBY , ISNOTEVENBY , ISODD , ISNOTODD , ISODDBY , ISNOTODDBY , "==" , "!=" , "(>,gt)" , "(<,lt)" , "(>=,ge)" , "(<=,le)" , "===" , "!==" , "(%,mod)" , "(&&,and)" , "(

located in: library\Smarty\sysplugins\smarty_internal_templatecompilerbase.php [404 line]


this is bug or no?
thanks

ps
in ver2 this cod work fine
Back to top
View user's profile Send private message
mohrt
Administrator


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

PostPosted: Mon Oct 11, 2010 1:49 pm    Post subject: Reply with quote

you can't have the space before the "}" tag. Remove that space, or disable auto literal.
Back to top
View user's profile Send private message Visit poster's website
newbie78
Smarty Rookie


Joined: 11 Oct 2010
Posts: 6

PostPosted: Mon Oct 11, 2010 2:09 pm    Post subject: Reply with quote

mohrt wrote:
you can't have the space before the "}" tag. Remove that space, or disable auto literal.

i'm found $smarty->auto_literal. great feature - i didn't know about it. thanks
Back to top
View user's profile Send private message
newbie78
Smarty Rookie


Joined: 11 Oct 2010
Posts: 6

PostPosted: Mon Oct 11, 2010 3:12 pm    Post subject: Reply with quote

auto literal won't work for <style> definition like
Code:

<style>
.popupList{float:left; border:1px solid #C9DCA6; width:585px; margin:0 0 10px 0;} .table{border:1px solid #C9DCA6;} .table th{color:#000; background:#FFF;}
.popupList .l-title, .popupList .l-name, .popupList .l-name, .popupList .l-delete, .popupList .l-status, .popupList .l-num{float:left;}
.popupList .l-title span,.popupList .l-name span, .popupList .l-status span, .popupList .l-num span{display:block; padding:3px 5px 3px 5px; line-height:17px;}
.small-span{ line-height:13px !important;}
.popupList .l-delete span{display:block;  padding:3px 5px 7px 5px;}
.popupList .l-name {width:355px;}
.popupList .l-title {width:535px; padding:1px 0px 3px 0px !important;}
.popupList .l-delete {width:50px;}
.popupList .l-status {width:100px;}
.popupList .l-num {width:80px;}
.popupList .l-num input{width:50px;}
.popupList .blue{background:#EAFAFA;}
.rejected {color:red;} .pending{color:#FFD700;} .approved{color:green;} .published{background:green; color:#FFF;} .error{background:red;}
</style>


what wrong? or it's work only for <script type="text/javascript"> definition?
Back to top
View user's profile Send private message
mohrt
Administrator


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

PostPosted: Mon Oct 11, 2010 3:31 pm    Post subject: Reply with quote

You have to be careful about your {} tags. auto_literal has no conciousness of CSS/Javascript. It just makes Smarty ignore {} tags that are surrounded by whitespace. If you don't surround them by whitespace, they will be interpreted as Smarty tags.

So, in your <style> definitions, be sure to put whitespace around {} tags and they will work. Example:

Code:
popupList {
  float:left;
  border:1px solid #C9DCA6;
  width:585px; margin:0 0 10px 0;
}
.table {
  border:1px solid #C9DCA6;
}
.table th {
  color:#000;
  background:#FFF;
}


Smarty will ignore that just fine. If you need to cram your styles all together, then put {literal}{/literal} tags around the entire block.

Code:
{literal}
.popupList{float:left; border:1px solid #C9DCA6; width:585px; margin:0 0 10px 0;} .table{border:1px solid #C9DCA6;} .table th{color:#000; background:#FFF;}
{/literal}
Back to top
View user's profile Send private message Visit poster's website
cobex4
Smarty Regular


Joined: 02 Sep 2008
Posts: 74

PostPosted: Tue Oct 12, 2010 7:23 am    Post subject: Reply with quote

X-MAN wrote:
Many thanks for new RC. I will be test it Smile

Do you planing to make final release to end of this year?


+1
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 1, 2  Next
Page 1 of 2

 
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