[pLog-svn] {dynamic} tags and plugins

Jon Daley plogworld at jon.limedaley.com
Wed May 2 10:26:43 EDT 2007


http://bugs.lifetype.net/view.php?id=293

We have talked about this a long time ago, and came up with the conclusion 
that plugins can't work inside the {dynamic} tag. It turns out that isn't 
really true.

The problem is in class/view/blogview.class.php, where a bunch of template 
objects are only included if the template isn't cached.  If you move the 
plugin for loop (or the $now) code, those variables are available inside a 
{dynamic} tag.

However, since that increases the RAM used for cached pages, we don't want 
to just put everything outside the if(!cached) block.

I was wondering about either letting the plugins decide themselves if they 
should be loaded or not, or check the template to see if there is a 
{dynamic} tag or have an administration preference that says "Allow 
plugins inside dynamic tags.  I am not sure what would be the easiest or 
best.  Any thoughts?

I see now that for the plugins the objects are already loaded even in a 
cached view (I think) but the call to PluginManager->getPlugins calls 
register() for each plugin in the non-cached view as opposed to the cached 
view.  Maybe that overhead isn't that much?




More information about the pLog-svn mailing list