[pLog-svn] r1899 - plog/branches/plog-1.0.1/class/action

Oscar Renalias phunkphorce at gmail.com
Fri Apr 22 14:37:17 GMT 2005


Yes :)

The problem with threading the comments is that it is not that easy...
It can de bone, but it might require a few loops and accesses to the
db to build the whole tree of comments.

Or we can attempt to do something similar to what I achieved in
GalleryAlbums::getUserAlbumsGroupedByParentId() which also generates a
list which is ready to show in nested forms (it creates the nice list
of nested album names that you can see for example in the "resources"
page) We just need a way to store how deeply indented the comment
should be shown at the template level.

Oscar

On 4/22/05, Jon Daley <plogworld at daley.snurgle.org> wrote:
>         This only solves the subject part of the field, right? but the
> ordering of the comments is a harder problem, yes?
> 
> On Fri, 22 Apr 2005 oscar at devel.plogworld.net wrote:
> 
> > Author: oscar
> > Date: 2005-04-22 14:11:33 +0000 (Fri, 22 Apr 2005)
> > New Revision: 1899
> >
> > Modified:
> >   plog/branches/plog-1.0.1/class/action/commentaction.class.php
> > Log:
> > backport of plog-1.1 rev 1898 for this poor user: http://forums.plogworld.net/viewtopic.php?t=2208. We will not make this feature too public becuase it needs changes to the locale (the "Re:" or whatever string that should be used for prefixing needs to be added, commentform.template modified, etc) but at least if people ask for it before 1.1 is out, they can make the changes themselves.
> >
> >
> > Modified: plog/branches/plog-1.0.1/class/action/commentaction.class.php
> > ===================================================================
> > --- plog/branches/plog-1.0.1/class/action/commentaction.class.php     2005-04-22 14:01:44 UTC (rev 1898)
> > +++ plog/branches/plog-1.0.1/class/action/commentaction.class.php     2005-04-22 14:11:33 UTC (rev 1899)
> > @@ -70,6 +70,16 @@
> >                       // fetch the comments so far
> >                       $comments = new ArticleComments();
> >                       $postComments = $comments->getPostComments( $article->getId());
> > +                     $postComments = $comments->getPostComments( $article->getId());
> > +                     if( $this->_parentId > 0 ) {
> > +                             // get a pre-set string for the subject field, for those users interested
> > +                             $comment = $comments->getPostComment( $article->getId(), $this->_parentId );
> > +                             // create the string
> > +                             if( $comment ) {
> > +                                     $replyString = $this->_locale->tr("reply_string").$comment->getTopic();
> > +                                     $this->_view->setValue( "comment", $comment );
> > +                             }
> > +                     }
> >
> >             // if everything's fine, we set up the article object for the view
> >             $this->_view->setValue( "category", $category );
> > @@ -78,6 +88,7 @@
> >             $this->_view->setValue( "parentId", $parentId );
> >                       $this->_view->setValue( "comments", $postComments );
> >                       $this->_view->setValue( "postcomments", $postComments );
> > +                     $this->_view->setValue( "topic", $replyString );
> >
> >             $this->setCommonData();
> >
> >
> > _______________________________________________
> > pLog-svn mailing list
> > pLog-svn at devel.plogworld.net
> > http://devel.plogworld.net/mailman/listinfo/plog-svn
> >
> 
> **************************************************************
> *     Jonathan M. Daley     *    Enter any 11-digit prime    *
> *   jondaley at snurgle.org    *       number to continue.      *
> * www.snurgle.org/~jondaley *                                *
> **************************************************************
> _______________________________________________
> pLog-svn mailing list
> pLog-svn at devel.plogworld.net
> http://devel.plogworld.net/mailman/listinfo/plog-svn
>



More information about the pLog-svn mailing list