For Programmers: Free Programming Magazines  


Home > Archive > PHP Smarty Templates > October 2004 > SV: SV: [SMARTY] bug in block_function handling?









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author SV: SV: [SMARTY] bug in block_function handling?
Paolo Nesti Poggi

2004-10-23, 3:56 pm

> -----Oprindelig meddelelse-----
> Fra: boots [mailto:jayboots@yahoo.com]
> Sendt: 23. oktober 2004 02:23
> Til: Paolo Nesti Poggi



>
> 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, but I still need the plugin in the
plugin_dir to be "loaded", otherwise I will get the "could not load plugin
file" error. 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"?

paolo
Messju Mohr

2004-10-23, 3:56 pm

On Sat, Oct 23, 2004 at 07:25:40PM +0200, Paolo Nesti Poggi wrote:
>
>
>
> 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

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com