Author |
Message |
Topic: How to run a custom function before compilation ? |
ildar
Replies: 7
Views: 9849
|
Forum: General Posted: Thu Nov 10, 2016 4:22 pm Subject: How to run a custom function before compilation ? |
Why did you no use
require_once 'custom_functions_definitions.php';
I have posted an related issue
https://github.com/smarty-php/smarty/issues/314 |
Topic: How to run a custom function before compilation ? |
ildar
Replies: 7
Views: 9849
|
Forum: General Posted: Fri Sep 30, 2016 8:17 am Subject: How to run a custom function before compilation ? |
You must use class autoloader for that kind of tasks. Then you won't need to waste your time inventing wheels.
SEE ALSO:
It seems autoloader does not work in this case
$smarty->registerF ... |
Topic: How to run a custom function before compilation ? |
ildar
Replies: 7
Views: 9849
|
Forum: General Posted: Fri Sep 30, 2016 6:29 am Subject: How to run a custom function before compilation ? |
You must use class autoloader for that kind of tasks. Then you won't need to waste your time inventing wheels.
SEE ALSO:
Thank you for the solution |
Topic: How to run a custom function before compilation ? |
ildar
Replies: 7
Views: 9849
|
Forum: General Posted: Fri Sep 30, 2016 6:28 am Subject: How to run a custom function before compilation ? |
I suppose
$smarty->addAutoloadFilters(array('mainPreFilter'), 'pre');
is better |
Topic: How to run a custom function before compilation ? |
ildar
Replies: 7
Views: 9849
|
Forum: General Posted: Thu Sep 29, 2016 3:19 pm Subject: How to run a custom function before compilation ? |
Hello,
How can I run a custom function before compilation?
Ie something like 'on compile hook for a file'/'on compile event listener a file'
or
something like 'global on compile hook'/'global ... |
Topic: Smarty errors in X-Cart |
ildar
Replies: 6
Views: 10737
|
Forum: General Posted: Wed Jun 22, 2016 12:46 pm Subject: Smarty errors in X-Cart |
By "this" I meant X-Cart throwing Smarty errors after php update.. the actual error is
Warning: Smarty error: unable to read resource: "admin/home.tpl" in /homepages/7/,,,,/Smarty ... |
Topic: Elegant bug |
ildar
Replies: 5
Views: 22148
|
Forum: Bugs Posted: Wed Apr 06, 2016 6:31 am Subject: Elegant bug |
The fix is now on github in the master branch.
It will be soon included in the maintenance release 3.1.29
Please, have a look
https://github.com/smarty-php/smarty/commit/9a8bcb93b1c7a4df574fc7 ... |
Topic: Modifier strip_tags |
ildar
Replies: 20
Views: 76472
|
Forum: Plugins Posted: Fri Sep 25, 2015 2:41 pm Subject: Modifier strip_tags |
Your answer is complete.
Thank you for the corrections.
I have changed my sample code
http://www.smarty.net/forums/viewtopic.php?p=89419#89419 |
Topic: Modifier strip_tags |
ildar
Replies: 20
Views: 76472
|
Forum: Plugins Posted: Fri Sep 25, 2015 11:31 am Subject: Modifier strip_tags |
You are right
http://stackoverflow.com/questions/6619020/how-can-i-define-the-directory-separator-for-both-windows-and-linux-platform
"PHP accepts both \ and / as valid path separators i ... |
Topic: Modifier strip_tags |
ildar
Replies: 20
Views: 76472
|
Forum: Plugins Posted: Fri Sep 25, 2015 6:10 am Subject: Modifier strip_tags |
addPluginsDir() does append your custom plugins folder to the search order. So Smarty will find its default modifier first.
Use setPluginsDir() and place you folder first in array().
See http://ww ... |
Topic: Modifier strip_tags |
ildar
Replies: 20
Views: 76472
|
Forum: Plugins Posted: Tue Sep 22, 2015 9:41 am Subject: Modifier strip_tags |
Yes, the search order for plugins does first look for compiler versions of the plugins.
So you must remove it, or you can replace it's code with
$output = '(empty(' . $output . ') ... |
Topic: Modifier strip_tags |
ildar
Replies: 20
Views: 76472
|
Forum: Plugins Posted: Mon May 18, 2015 6:32 am Subject: Modifier strip_tags |
Just a note
Your default modifier will not work on tags like
{tag|default:"DOES NOT WORK"}
I have changed the default
include/lib/smarty3/plugins/modifiercompiler. ... |
Topic: Modifier strip_tags |
ildar
Replies: 20
Views: 76472
|
Forum: Plugins Posted: Fri May 15, 2015 5:35 am Subject: Modifier strip_tags |
Yes, the search order for plugins does first look for compiler versions of the plugins.
So you must remove it, or you can replace it's code with
$output = '(empty(' . $output . ') ... |
Topic: Modifier strip_tags |
ildar
Replies: 20
Views: 76472
|
Forum: Plugins Posted: Thu May 14, 2015 10:24 am Subject: overwrite the default plugins/modifiercompiler.default.php |
Normally Smarty2 modifier do run also under Smarty3.
Yes, in your case you must remove the modifiercompiler.strip_tags.php file because of the search order for modifier.
I would like to overwrit ... |
|