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

Search found 1787 matches
Smarty Forum Index
Author Message
  Topic: Fatal error: Uncaught 'Smarty_Internal_Method_Assign_By_Ref'
AnrDaemon

Replies: 2
Views: 73368

PostForum: Bugs   Posted: Sat Apr 16, 2022 12:50 pm   Subject: Fatal error: Uncaught 'Smarty_Internal_Method_Assign_By_Ref'
More specifically, modifying variable by reference is the worst case of scope leak.
Not going to work, you have to fix your code.
  Topic: How cna I clear all variables assigned in a template?
AnrDaemon

Replies: 6
Views: 21954

PostForum: General   Posted: Sun Apr 10, 2022 9:18 pm   Subject: How cna I clear all variables assigned in a template?
That's a very bad idea.
  Topic: use DEBUG within tempalte?
AnrDaemon

Replies: 2
Views: 14218

PostForum: General   Posted: Wed Apr 06, 2022 11:27 am   Subject: use DEBUG within tempalte?
I strongly recommend against debugging on live website, no matter the circumstances, as consequences could be dire.
With that warning considered, you could try something like <!--
{<expre ...
  Topic: How cna I clear all variables assigned in a template?
AnrDaemon

Replies: 6
Views: 21954

PostForum: General   Posted: Wed Apr 06, 2022 11:22 am   Subject: How cna I clear all variables assigned in a template?
There's a way to not do that.
If you are pre-rendering your website and need to render the same template with slightly different input data, use foreach ($array as $i => $v) {
$sm ...
  Topic: trying to Add dynamic canonical tags
AnrDaemon

Replies: 3
Views: 15763

PostForum: General   Posted: Wed Apr 06, 2022 11:17 am   Subject: trying to Add dynamic canonical tags
Don't forget to escape the output value appropriately.
In both cases.
  Topic: Validate an URL
AnrDaemon

Replies: 4
Views: 77584

PostForum: Smarty Development   Posted: Wed Apr 06, 2022 11:15 am   Subject: Validate an URL
Thanks for the response, but thats not an option Sad
That IS an option. Write your query to NOT load disabled products, and you won't have this issue in the first place.
  Topic: Validate an URL
AnrDaemon

Replies: 4
Views: 77584

PostForum: Smarty Development   Posted: Thu Mar 17, 2022 9:49 pm   Subject: Validate an URL
Then don't load that product from database in the first place.
  Topic: how from upgrade smarty-2.6.26 to 3.0.2
AnrDaemon

Replies: 1
Views: 65654

PostForum: Smarty 3   Posted: Thu Mar 17, 2022 9:45 pm   Subject: how from upgrade smarty-2.6.26 to 3.0.2
Upgrade library and see if it works.
The instructions are on the web.
  Topic: Extending Smarty 4
AnrDaemon

Replies: 4
Views: 17204

PostForum: General   Posted: Tue Feb 15, 2022 6:05 pm   Subject: Extending Smarty 4
The patch is found
I wrote some quick comments, but I did not gave it a thorough review.
Perhaps create a pull request into smarty/smaty-php and let's have a more productive discussion there?

I ...
  Topic: Smarty 3 Caching Problem
AnrDaemon

Replies: 3
Views: 15724

PostForum: General   Posted: Tue Feb 15, 2022 5:41 am   Subject: Smarty 3 Caching Problem
You should specify it yourself.
See note in documentation for example use cases https://www.smarty.net/docs/en/variable.compile.id.tpl
  Topic: Can I use smarty to create table with mysql data?
AnrDaemon

Replies: 1
Views: 13899

PostForum: General   Posted: Fri Feb 11, 2022 9:54 am   Subject: Can I use smarty to create table with mysql data?
Yes? I don't see why not.
There's even an example https://www.smarty.net/docs/en/language.function.html.table.tpl#idp39237312
  Topic: Extending Smarty 4
AnrDaemon

Replies: 4
Views: 17204

PostForum: General   Posted: Fri Feb 11, 2022 9:51 am   Subject: Extending Smarty 4
This is mostly question of time rather than willing or capability.
I've had this idea for last decade or more. But ouch.
  Topic: Smarty 3 Caching Problem
AnrDaemon

Replies: 3
Views: 15724

PostForum: General   Posted: Fri Feb 11, 2022 9:49 am   Subject: Smarty 3 Caching Problem
Start using compile_id directly. That's probably the only sane suggestion I could offer.
  Topic: Smarty Database Cache
AnrDaemon

Replies: 1
Views: 11707

PostForum: Smarty 3   Posted: Fri Jan 28, 2022 10:46 am   Subject: Smarty Database Cache
Replied on reddit. Sorry I got overwhelmed by the events.
  Topic: Creating if/counter/foreach based on number instead of array
AnrDaemon

Replies: 4
Views: 18506

PostForum: General   Posted: Fri Jan 28, 2022 10:46 am   Subject: Creating if/counter/foreach based on number instead of array
Don't know how useful this would be to your case, but here's an example I baked some time ago
https://www.smarty.net/forums/viewtopic.php?t=25658&highlight=cycle
 
Page 1 of 120 Goto page 1, 2, 3 ... 118, 119, 120  Next
All times are GMT
Jump to:  


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