For article lists like Recent Articles and Featured Articles, there's only 2 small modifications you need to make in 2 different files for the comments to be displayed.
Firstly, you need to find the number of comments to display. If you open your /admin/includes/classes/class.helper.php file and find the GetArticles() function, add the below code directly after the line beginning with $GLOBALS['imgpath']
For Interspire Website Publisher NX 2.0 and above you need to use the GetArticleList() function in the /includes/classes/class.article.php file. Place this code at the top of the function.
$GLOBALS['HideComments'] = '';
if($articleRow["Type"] != 1) {
$GLOBALS['HideComments'] = 'none';
}
$query = sprintf("SELECT COUNT(*) as co FROM %scomments WHERE ContentID=%d AND Details!=''", $GLOBALS["AL_CFG"]["tablePrefix"], $articleRow["ArticleID"]);
$query = $GLOBALS["AL_DB"]->Query($query);
$commCount = $GLOBALS["AL_DB"]->Fetch($query);
$GLOBALS["NumComments"] = $commCount["co"];
$GLOBALS["AL_DB"]->FreeResult($query);Then, you need to be able to display the comments in the list. We'll place it with the bottom links, such as Full Article and Printer Version.
For NX 1.7: Open the ArticleList.html Snippet file (/templates/{your template}/Panels/Snippets/ArticleList.html) and add the code below directly before %%SNIPPET_ArticleEditButton%%
For NX 2.0: Open one of the 'ArticleList' snippets (e.g. ArticleList_featured.html for the Featured Articles list) which are located in the /templates/{your template}/Panels/Snippets/ folder and add the code below directly before %%SNIPPET_ArticleEditButton%%
<li class="Comments" style='display:%%GLOBAL_HideComments%%'><a href='%%GLOBAL_url%%'>Comments: %%GLOBAL_NumComments%%</a></li>
You can then add a style in the styles.css file for that Comments class, to add a small image or anything else to fit with the other links.
