How can show NEWCOMMENTS in summary page?

How can show NEWCOMMENTS in summary page?

Postby php on Tue Nov 21, 2006 8:06 pm

Dear all:
I want to show newComments in summary page, I modify "class/summary/dao/summarystats.class.php",
Code: Select all
function getRecentComments( $maxComments = 20) {
include_once( PLOG_CLASS_PATH.'class/dao/articlecomments.class.php' );
            include_once( PLOG_CLASS_PATH.'class/dao/usercomment.class.php' );   
            include_once( PLOG_CLASS_PATH."class/dao/articles.class.php" );
             $articleComments = new ArticleComments();
              $articles = new Articles();
               $prefix = $this->getPrefix();
               $query = "SELECT * FROM {$prefix}articles_comments WHERE status = 0 ORDER BY date DESC LIMIT 0,".$maxComments;
                $result = $this->Execute($query);
               if(!$result)
                 return false;
               $recentComments = Array();
               while( $row = $result->FetchRow()){
                 $comment = $articleComments->getComment($row['id']);
                  $comment->setArticle($articles->getArticle[$row['article_id']]);
                  array_push($recentComments,$comment);
              }
              $result->Close();
              return $recentComments;
}

But it can't show the new comments in summary page?
Please help me!
Thanks.
php
 
Posts: 13
Joined: Thu Nov 16, 2006 7:35 am

Postby phunkphorce on Wed Nov 22, 2006 2:43 am

phunkphorce
Lifetype Expert
 
Posts: 9028
Joined: Mon Aug 25, 2003 6:34 am
Location: Suomessa


Return to Plugin Development Team

cron