your kidding, right?
Where would we add this, browse_unit.html ?
I guess It's good suggestion for you :)
//get instance of photos module
$oPhotos = BxDolModule::getInstance('BxPhotosModule');
$oCmtsView = new BxTemplCmtsView($oPhotos -> _oConfig -> getMainPrefix(), $iPhotoId);
$iCommentsCount = $oCmtsView -> _oQuery -> getObjectCommentsCount($iPhotoId);
It's different question. Will be easy if hire some of expertz here to do this
Ok I will try explain all step by step :
1. Open the modules\boonex\photos\templates\base\browse_unit.html
add this key {comments_count} in any place
2. Open the modules\boonex\photos\classes\BxPhotosSearch.php
find this code line : $this->aCurrent['ownFields'] = array('ID', 'Title', 'Uri', 'Date', 'Size', 'Views', 'Rate', 'RateCount', 'Hash');
and replace with : $this->aCurrent['ownFields'] = array('ID', 'Title', 'Uri', 'Date', 'Size', 'Views', 'Rate', 'RateCount', 'Hash', 'CommentsCount');
3. Open the - templates\base\scripts\BxBaseSearchResultSharedMedia.php
find this code line : $aUnit['view'] = $aData['view'];
and past it after that:
$aUnit['comments_count'] = isset($aData['CommentsCount']) ? $aData['CommentsCount'] : '';