SV: SV: SV: [SMARTY] bug in block_function handling?
| From: | Paolo Nesti Poggi | Date: | Fri, 22 Oct 2004 09:32:47 +0000 |
| Subject: | SV: SV: SV: [SMARTY] bug in block_function handling? | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-11914@lists.php.net to get a copy of this message | ||
> On Thu, Oct 21, 2004 at 02:20:35PM +0200, Paolo Nesti Poggi wrote:
> > > -----Oprindelig meddelelse-----
> > > Fra: messju mohr [mailto:messju@lammfellpuschen.de]
> >
> > below is the test:
> >
> > In case 3 (registration needed)
> > In the application I have:
> > include_once('Smarty/Smarty_nocache_cmpt/block.nc.php');
>
> FWIW you should follow the example from
> http://smarty.php.net/manual/en/plugins.writing.php :
>
> require_once $smarty->_get_plugin_filepath('block', 'nc');
>
That page of the manual on this point says ("*" are mine):
<quote>
If a plugin depends on some functionality provided by *another plugin* (as
is the case with some plugins bundled with Smarty), then the proper way to
load the needed plugin is this ...
</quote>
It is a different case, I'm not including another plugin to use its
functionality inside mine.
Besides, how can smarty know the path of the plugin if it doesn't exists at
all in smarty yet. I'm registering it the first time I include it.
Or do my plugin have to reside in a particular directory for smarty to find
it?
on your question from the other message:
> do you register the plugin on each request? also on requests where
> is_cached() is true?
>
I call register_block regardless of cache settings
paolo