View previous topic :: View next topic |
Author |
Message |
mohrt Administrator
Joined: 16 Apr 2003 Posts: 7368 Location: Lincoln Nebraska, USA
|
Posted: Tue Oct 05, 2010 8:55 pm Post subject: Smarty 3 RC4 released |
|
|
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 |
|
klappi Guest
|
Posted: Tue Oct 05, 2010 9:12 pm Post subject: Re: Smarty 3 RC4 released |
|
|
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
|
Posted: Wed Oct 06, 2010 8:59 am Post subject: |
|
|
Many thanks for new RC. I will be test it
Do you planing to make final release to end of this year? |
|
Back to top |
|
juliendusud Smarty Rookie
Joined: 08 Oct 2010 Posts: 10
|
Posted: Fri Oct 08, 2010 9:22 am Post subject: Smarty 3 RC4 |
|
|
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 " <tr style="background-color:{if $liste_mails[id].lu != 'lu'}#adf983{else}{cycle values="#e5e5e5,#d1d1d1"}{/if}">" 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 |
|
U.Tews Administrator
Joined: 22 Nov 2006 Posts: 5068 Location: Hamburg / Germany
|
Posted: Fri Oct 08, 2010 1:22 pm Post subject: |
|
|
It looks like your $plugins_dir is pointing to wrong location |
|
Back to top |
|
juliendusud Smarty Rookie
Joined: 08 Oct 2010 Posts: 10
|
Posted: Fri Oct 08, 2010 4:14 pm Post subject: |
|
|
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 |
|
mohrt Administrator
Joined: 16 Apr 2003 Posts: 7368 Location: Lincoln Nebraska, USA
|
Posted: Fri Oct 08, 2010 4:20 pm Post subject: |
|
|
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 |
|
juliendusud Smarty Rookie
Joined: 08 Oct 2010 Posts: 10
|
Posted: Fri Oct 08, 2010 4:42 pm Post subject: |
|
|
If I put setCaching(true) it displays always the same page, but my website was running perfectly with the latest version. |
|
Back to top |
|
mohrt Administrator
Joined: 16 Apr 2003 Posts: 7368 Location: Lincoln Nebraska, USA
|
Posted: Fri Oct 08, 2010 4:46 pm Post subject: |
|
|
you probably want a separate cache_id per page you want cached. this takes some understanding of smarty and caching. |
|
Back to top |
|
newbie78 Smarty Rookie
Joined: 11 Oct 2010 Posts: 6
|
Posted: Mon Oct 11, 2010 12:24 pm Post subject: |
|
|
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 |
|
mohrt Administrator
Joined: 16 Apr 2003 Posts: 7368 Location: Lincoln Nebraska, USA
|
Posted: Mon Oct 11, 2010 1:49 pm Post subject: |
|
|
you can't have the space before the "}" tag. Remove that space, or disable auto literal. |
|
Back to top |
|
newbie78 Smarty Rookie
Joined: 11 Oct 2010 Posts: 6
|
Posted: Mon Oct 11, 2010 2:09 pm Post subject: |
|
|
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 |
|
newbie78 Smarty Rookie
Joined: 11 Oct 2010 Posts: 6
|
Posted: Mon Oct 11, 2010 3:12 pm Post subject: |
|
|
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 |
|
mohrt Administrator
Joined: 16 Apr 2003 Posts: 7368 Location: Lincoln Nebraska, USA
|
Posted: Mon Oct 11, 2010 3:31 pm Post subject: |
|
|
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 |
|
cobex4 Smarty Regular
Joined: 02 Sep 2008 Posts: 74
|
Posted: Tue Oct 12, 2010 7:23 am Post subject: |
|
|
X-MAN wrote: | Many thanks for new RC. I will be test it
Do you planing to make final release to end of this year? |
+1 |
|
Back to top |
|
|