Re: SV: SV: [SMARTY] bug in block_function handling?
| From: | messju mohr | Date: | Sat, 23 Oct 2004 17:44:56 +0000 |
| Subject: | Re: SV: SV: [SMARTY] bug in block_function handling? | ||
| References: | 1 2 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-11923@lists.php.net to get a copy of this message | ||
On Sat, Oct 23, 2004 at 07:25:40PM +0200, Paolo Nesti Poggi wrote:
> > -----Oprindelig meddelelse-----
> > Fra: boots [mailto:jayboots@yahoo.com]
> > Sendt: 23. oktober 2004 02:23
> > Til: Paolo Nesti Poggi
>
>
> > > instead I should have simply kept it there, _added a call to
> > > include_once('path/to/plugin')_
> > > to avoid: "[plugin] block 'nc' is not implemented" , and
> > > registered
> > > it.
> >
> > It almost sounds like you weren't manually including the plugin during
> > a cache hit but rather were only registering it. Perhaps that is why
> > Smarty was trying to load it from one of its known plugin dirs. In
> > theory, you can prevent Smarty from ever searching the plugin dirs if
> > you manually load and register your them. Anyways, I'm glad to hear
> > that you got it solved.
>
> Well, then I stay with one more open question: when you say "manually
> loading" what do you mean?
> I know now that I can /must manually "include" a plugin, as any other file,
> and then manually register it instead of letting the plugin dir and the
> naming convention do both things for me,
yes, that's called "register the plugin manually".
> but I still need the plugin in the plugin_dir to be "loaded",
> otherwise I will get the "could not load plugin file" error.
no! smarty won't try to auto-load your plugin if you already
registered it manually.
it will only throw a '"could not load plugin file" error' if the
plugin wasn't registered *and* is not not found in plugins_dir. but
manually registered plugins *always* have precedence over
auto-loading.
> But actually I don't know how I can manually "load" the plugin,
> you don't seem to use the words "registering" and "loading" as
> synonyms, so
> what is "manually loading"?
what he (boots) meant here with "manually loading" is: "making sure
that the implementation of the plugin (the php-funciton) is defined".
> paolo