RE: [PHPTAL] Prefilter fails
> [mailto:phptal-boun...@lists.motion-twin.com] On Behalf Of > Kornel Lesinski > > Ah, that's a bug I've fixed last month :) > > You need to make PHPTAL re-parse the template, otherwise > changes in prefilter won't be noticed (touch the file or > clear cache in /tmp). Thanks, Kornel; all working now. ___ PHPTAL mailing list PHPTAL@lists.motion-twin.com http://lists.motion-twin.com/mailman/listinfo/phptal
Re: [PHPTAL] Prefilter fails
On 19-02-2009 at 16:28:35 wrote: Added that and PHP no longer dies. But I still can't get the Prefilter to change the output even if I totally replace the source using: filtered content"; } } $tpl = new PHPTAL('mytemplate.html'); $tpl->setPreFilter(new MyPreFilter()); echo $tpl->execute(); ?> It would really help if I can see a sample that's known to work. Ah, that's a bug I've fixed last month :) You need to make PHPTAL re-parse the template, otherwise changes in prefilter won't be noticed (touch the file or clear cache in /tmp). -- regards, Kornel ___ PHPTAL mailing list PHPTAL@lists.motion-twin.com http://lists.motion-twin.com/mailman/listinfo/phptal
RE: [PHPTAL] Prefilter fails
Hi, > Sorry, manual fails to mention that you need to add > > require_once 'PHPTAL/Filter.php'; > > to your code. I'll make that unnecessary in next version of PHPTAL. > > regards, Kornel Thanks, Kornel. Added that and PHP no longer dies. But I still can't get the Prefilter to change the output even if I totally replace the source using: filtered content"; } } $tpl = new PHPTAL('mytemplate.html'); $tpl->setPreFilter(new MyPreFilter()); echo $tpl->execute(); ?> It would really help if I can see a sample that's known to work. Thanks, Chris ___ PHPTAL mailing list PHPTAL@lists.motion-twin.com http://lists.motion-twin.com/mailman/listinfo/phptal
Re: [PHPTAL] Prefilter fails
On 19-02-2009 at 07:59:53 wrote: I thought PHP's "implements" only worked with "interface" but the PHPTAL.php 1_1_15 doesn't use "interface" anywhere, so this is never going to work. Have I misunderstood or is the manual out of date on this point? Sorry, manual fails to mention that you need to add require_once 'PHPTAL/Filter.php'; to your code. I'll make that unnecessary in next version of PHPTAL. -- regards, Kornel ___ PHPTAL mailing list PHPTAL@lists.motion-twin.com http://lists.motion-twin.com/mailman/listinfo/phptal