[pLog-svn] r5731 - plugins/branches/lifetype-1.2/tagcloud

Paul Westbrook paul at westbrooks.org
Thu Jul 26 11:22:24 EDT 2007


Hello,
   I was seeing that this plugin was not generating the tagcloud when new
posts were added.  The last modification date of the tagcloud cache file was
May 11th.

   This the register() method of this plugin just loads whether it is
enabled.  It looks like register had not been called before processing the
events.

   I added the call to register() to make sure the enabled setting was
loaded.  This is the same calling pattern that is used by other plugins (i.e.
blogtimes, twitter.)

   It may be "wrong" to have to explicitly call register(), and if that is
the case, we should look and see why register is not being called before the
events are processed.

--Paul



On 7/26/07, Jon Daley <plogworld at jon.limedaley.com> wrote:
>
>         There must be something I still am not understanding.  Plugins
> shouldn't have to call register manually, should they?
>
> On Thu, 26 Jul 2007, pwestbro at devel.lifetype.net wrote:
>
> > Author: pwestbro
> > Date: 2007-07-26 00:26:25 -0400 (Thu, 26 Jul 2007)
> > New Revision: 5731
> >
> > Modified:
> >   plugins/branches/lifetype-1.2/tagcloud/plugintagcloud.class.php
> > Log:
> > Fixed a problem were tagclouds were not being generated
> >
> >
> > Modified: plugins/branches/lifetype-1.2
> /tagcloud/plugintagcloud.class.php
> > ===================================================================
> > --- plugins/branches/lifetype-1.2/tagcloud/plugintagcloud.class.php
> 2007-07-25 22:01:03 UTC (rev 5730)
> > +++ plugins/branches/lifetype-1.2/tagcloud/plugintagcloud.class.php
> 2007-07-26 04:26:25 UTC (rev 5731)
> > @@ -28,7 +28,7 @@
> >             lt_include( PLOG_CLASS_PATH."class/database/db.class.php" );
> >             $this->db =& Db::getDb();
> >             $this->id = "tagcloud";
> > -            $this->version = "20070511";
> > +            $this->version = "20070725";
> >
> >             $this->locales = Array("en_UK");
> >
> > @@ -94,7 +94,7 @@
> >         function process( $eventType, $params )
> >         {
> >             $validEvent = false;
> > -
> > +
> >             // Looking for EVENT_POST_POST_ADD, EVENT_POST_POST_UPDATE,
> EVENT_POST_POST_DELETE
> >             // or EVENT_POST_ADMIN_PURGE_TEMP_FOLDER (if defined)
> >             if ( $eventType == EVENT_POST_POST_ADD ||
> > @@ -110,12 +110,15 @@
> >             {
> >                 return true;
> >             }
> > +
> > +            // Load all of the settings for this blog
> > +                     $this->register();
> >
> >             if(!$this->isEnabled())
> >             {
> >                 return true;
> >             }
> > -
> > +
> >             // Update the Blogtime png
> >             $this->createCloud();
> >
> >
> > _______________________________________________
> > pLog-svn mailing list
> > pLog-svn at devel.lifetype.net
> > http://limedaley.com/mailman/listinfo/plog-svn
> >
>
> --
> Jon Daley
> http://jon.limedaley.com/
>
> By swallowing evil words unsaid, no one has ever harmed his stomach.
> -- Winston Churchill
> _______________________________________________
> pLog-svn mailing list
> pLog-svn at devel.lifetype.net
> http://limedaley.com/mailman/listinfo/plog-svn
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://limedaley.com/pipermail/plog-svn/attachments/20070726/09c929d9/attachment.htm 


More information about the pLog-svn mailing list