Elxis CMS Forum

Extensions => Modules => Topic started by: mitsoud on September 24, 2009, 13:45:11

Title: Articles number of comments in frontpage module (Elxis 2009)
Post by: mitsoud on September 24, 2009, 13:45:11
With my friend Hara we edit mod_frontpage.php like this
in line 131 we add
$query .= ", (SELECT COUNT(z.cid) FROM #__comments z WHERE z.origin='1' AND z.articleid = a.id";
         if ($my->gid != 25) { $query .= " AND z.published='1'"; }
         $query .= ") AS comments";
and in line 288
$txt = intval($row->comments) === 1 ? '1 '._E_COMMENT : $row->comments.' '._E_COMMENTS;
            echo '<div class="item_comments">'.$txt.'</div>'._LEND;
and now the number of comments appears in frontpage module also
have a look
http://www.xristianiki.gr
Do you ELXISGURU people accept it?   ::)