[pLog-svn] r5274 - plugins/branches/lifetype-1.2/cssnaked

Reto Hugi plog at hugi.to
Thu Apr 5 02:50:49 EDT 2007


Oscar Renalias wrote:
> On 4/5/07, Reto Hugi <plog at hugi.to> wrote:
>> sorry, this was weird talking, it's late...
>>
>> I try again :)
>>
>> oh, and the ouput filter works great, I should just have taken more
>> attention to what I get as parameters to the process() method. Most of 
>> the
>> plugins do $blogsettings->getValue('config_value') stuff in the
>> register() method,
>> but I guess it would be better to do this in the process() method, right?
>> register should only be used to check if we need to 'install' 
>> something...
> 
> Actually, no :-)
> 
> According to our own API (which I myself had to check because I had
> already forgotten :-)), PluginBase::register() is used every time the
> plugin is initialized and it is the right place to query things like
> blog settings or parameters. That's because when the constructor of
> the plugin is called, we still don't have things like a BlogInfo or
> UserInfo object.
> 
> The PluginBase::install() method is the one you should use to do
> things that should be done only once like initializing database
> tables.

oh, we have an install() method! :D nice.
but then again, in my case the register() method was not useful because 
if frontend templates are cached the register method() does not have the 
blogInfo and UserInfo Object. But they get sent to process() within the 
$params parameter. see cssnaked for illustration.

cheers,
reto


More information about the pLog-svn mailing list