|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
mplx Smarty n00b
Joined: 13 Jun 2010 Posts: 3
|
Posted: Sun Jun 13, 2010 2:11 pm Post subject: RC1: output filter |
|
|
Hi,
I've upgraded a project to Smarty3 and it seems to work quite well, however I didn't manage to migrate the output filters.
While Code: | load_filter('output','trimwhitespace'); | works well (ok, it throws a Notice: function call 'load_filter' is unknown or deprecated. but I've disabled them as workaround with setDeprecationNotices(false) ) a Code: | register->outputFilter('trimwhitespace'); | throws a fatal php error (Fatal error: Call to undefined function trimwhitespace()).
First I thought this is a problem with my own filters, but the trimwhitespace is part of Smarty. Everything else works fine, so I guess the plugins dir is ok (and it works with load_filter).
So what's the thing I'm doing wrong?
Thanks for your help! |
|
Back to top |
|
U.Tews Administrator
Joined: 22 Nov 2006 Posts: 5068 Location: Hamburg / Germany
|
Posted: Sun Jun 13, 2010 3:30 pm Post subject: |
|
|
The API of Smarty3 has been changed. See the README.
$smarty->load_filter('output','trimwhitespace');
Is now
$smarty->loadFilter('output','trimwhitespace');
$smarty->register->outputFilter(...) must be used if a PHP function which is defined in your script shall be used as output filter. |
|
Back to top |
|
mplx Smarty n00b
Joined: 13 Jun 2010 Posts: 3
|
Posted: Mon Jun 14, 2010 8:28 am Post subject: |
|
|
I knew I was doing something wrong, but sometimes you don't see the wood for the trees. Thanks! |
|
Back to top |
|
|
|
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
|