Smarty Forum Index Smarty
The discussions here are for Smarty, a template engine for the PHP programming language.

Search found 7361 matches
Smarty Forum Index
Author Message
  Topic: Internationalization. Best Practices?
mohrt

Replies: 4
Views: 1655

PostForum: General   Posted: Sun Dec 18, 2016 8:51 pm   Subject: Internationalization. Best Practices?
Smarty is basically the "view" of your application. i18n is a bit out of scope for the template engine itself. As AnrDaemon mentioned, there have been some attempts at plugins for Smarty, al ...
  Topic: Smarty 3.1.30 Released
mohrt

Replies: 0
Views: 5414

PostForum: Announcements   Posted: Mon Aug 15, 2016 2:25 am   Subject: Smarty 3.1.30 Released
Many minor bug fixes and enhancements. One {math} shell injection vulnerability patch provided by Tim Weber. Note this is only vulnerable to those with template write access using security features.
...
  Topic: Simplify autoloading.
mohrt

Replies: 5
Views: 2352

PostForum: Smarty Development   Posted: Tue Jun 28, 2016 12:05 pm   Subject: Simplify autoloading.
I'm not terribly concerned with the intricacies of the autoloader, as this is not something a developer has to see or directly deal with. What is important is that it works for all intents and purpose ...
  Topic: Simplify autoloading.
mohrt

Replies: 5
Views: 2352

PostForum: Smarty Development   Posted: Tue Jun 28, 2016 1:17 am   Subject: Simplify autoloading.
submit a PR?
  Topic: How can I use {counter) in breadcrumb.tpl
mohrt

Replies: 3
Views: 1826

PostForum: General   Posted: Fri Jun 24, 2016 11:49 pm   Subject: How can I use {counter) in breadcrumb.tpl
You can't use a function inside a text string, it is just treated as text. If you do:

{counter assign="mycount"}

Then {$mycount} will contain the counter value and you can use $mycount ...
  Topic: Smarty v2.6.6 doesnt generate .php form template - Err 404
mohrt

Replies: 6
Views: 3177

PostForum: General   Posted: Mon Mar 21, 2016 2:36 pm   Subject: Smarty v2.6.6 doesnt generate .php form template - Err 404
The files in templates_c are automatically created by Smarty when a template is loaded. So for example, if you have a template named new_users.tpl and in somewhere in your PHP code you load that templ ...
  Topic: Smarty v2.6.6 doesnt generate .php form template - Err 404
mohrt

Replies: 6
Views: 3177

PostForum: General   Posted: Fri Mar 18, 2016 2:15 pm   Subject: Smarty v2.6.6 doesnt generate .php form template - Err 404
But when i open the web and try to open the URL new_users that should be linked to new_user.tpl.php, it shows me ERROR 404

Where does new_user.tpl.php come from? That is not something Smarty create ...
  Topic: Smarty v2.6.6 doesnt generate .php form template - Err 404
mohrt

Replies: 6
Views: 3177

PostForum: General   Posted: Thu Mar 17, 2016 5:16 pm   Subject: Smarty v2.6.6 doesnt generate .php form template - Err 404
Templates are not in the URL path. They are included by PHP. So your URL must go to a PHP file.
  Topic: how to disable cache for current tpl
mohrt

Replies: 2
Views: 3773

PostForum: Frameworks   Posted: Wed Mar 16, 2016 8:42 pm   Subject: how to disable cache for current tpl
version of smarty?
  Topic: Wrong link to download old versions of Smarty
mohrt

Replies: 2
Views: 3408

PostForum: Feature Requests   Posted: Thu Mar 10, 2016 5:32 pm   Subject: Wrong link to download old versions of Smarty
I changed the Smarty 2 link on the download page to go directly to the Smarty 2.x tags.
  Topic: Smarty speed benchmark
mohrt

Replies: 23
Views: 9088

PostForum: General   Posted: Mon Feb 29, 2016 4:59 pm   Subject: Smarty speed benchmark
What if you use a template file instead of a string? I have a hunch the compiler will need to evaluate and compile the template string on each invocation of the loop.
  Topic: PHP code in smarty template
mohrt

Replies: 2
Views: 2166

PostForum: General   Posted: Thu Feb 25, 2016 3:40 pm   Subject: PHP code in smarty template
It might be better to clearly understand what you need a share class for, and why it creates a header. Whatever the content is that is coming out of header(), that is probably what you want in your te ...
  Topic: Do I have any benefit from Smarty?
mohrt

Replies: 2
Views: 1737

PostForum: General   Posted: Mon Feb 22, 2016 8:24 pm   Subject: Do I have any benefit from Smarty?
If you are using wordpress and plan to stick with it, I would stay with the templating environment wordpress offers. Implementing Smarty in wordpress may be more effort than worth bothering with. That ...
  Topic: Smarty speed benchmark
mohrt

Replies: 23
Views: 9088

PostForum: General   Posted: Thu Feb 18, 2016 10:28 pm   Subject: Smarty speed benchmark
Try this in smarty 3, it has inline math:

string: {if $price > 30}{$price+20}{/if}

I'll let Uwe chime in on the speed specifics, I'm not sure why Smarty 3 versions would have such a differenc ...
  Topic: Copyright Year on the footer
mohrt

Replies: 11
Views: 43667

PostForum: Tips and Tricks   Posted: Tue Feb 16, 2016 9:45 pm   Subject: Copyright Year on the footer
There is, but we're on the Smarty forum discussing Smarty tips and tricks.

Yes and there is nothing wrong with writing HTML code such that the headers/footers can work in PHP/Smarty or other places ...
 
Page 1 of 491 Goto page 1, 2, 3 ... 489, 490, 491  Next
All times are GMT
Jump to:  


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