I've no free time to install ICE Gallery and test but this must work...
Open file /components/com_ice/view.php and replace code:
// Display comments-form for input of comments, if comments are allowed of course...
// The Edit-Monitor registers the user input and does not allow him/ her to add a comment again
// that session.
// ======================================= Comments ================================
if ($icenv->cfg['commentsOn']) {
$ice->createCheckAllScript(); ?>
<script language="Javasript" type="text/javascript">
<!--
function submitForm(theTask,cmtid){
document.MM_returnValue = true;
if (theTask=='clear') {
document.commentmgr.elements['textfilter'].value = '';
document.commentmgr.elements['creatorfilter'].value = '';
if (document.commentmgr.elements['publishfilter']) document.commentmgr.elements['publishfilter'].value = 0;
if (document.commentmgr.elements['previewfilter']) document.commentmgr.elements['previewfilter'].value = 0;
document.commentmgr.elements['task'].value = '';
} else {
if (theTask=='writecmt') MM_validateForm('uname','','R','comment','','R');
document.commentmgr.elements['task'].value = theTask;
document.commentmgr.elements['cmtid'].value = cmtid;
}
if (document.MM_returnValue) document.commentmgr.submit();
return false;
}
function newPage(page){
document.commentmgr.elements['CmtPageNo'].value = page;
document.commentmgr.submit();
return false;
}
//-->
</script>
<form name="commentmgr" action="<?php echo $icenv->sefRelToAbs($url_prefix);?>" method="post">
<input type="hidden" name="task" value="" />
<input type="hidden" name="cmtid" value="0" />
<?php
$creatorfilter = $icenv->getParam($_REQUEST,'creatorfilter');
$textfilter = $icenv->getParam($_REQUEST,'textfilter');
$publishfilter = $icenv->getParam($_REQUEST,'publishfilter');
$previewfilter = $icenv->getParam($_REQUEST,'previewfilter');
$empty = &new comment(); $edit = false;
$filters = array($creatorfilter,$textfilter,$publishfilter,0,$previewfilter);
$empty->display($m_img->_id,false,$edit,$filters,0,$cmtpg,$pglen,$icenv->cfg['cmtperpage']);
?>
<input type="hidden" name="CmtPageNo" value="<?php echo $cmtpg;?>" />
<input type="image" src="<?php echo $icenv->live."/components/com_ice/images/spacer.gif"; ?>" />
</form>
<?php
}
with
if ($icenv->cfg['commentsOn']) {
$comments = JPATH_SITE.DS.'components'.DS.'com_jcomments'.DS.'jcomments.php';
if (file_exists($comments)) {
require_once($comments);
echo JComments::showComments($m_img->_id, 'com_ice', $m_img->_name);
}
}
Open file /components/com_ice/classes/image.class.php
Replace code:
function getNumOfComments($list=true) {
global $icenv;
if ($list) return count($this->_comments);
$publ = $icenv->ident->_admin?'':' published = 1 AND ';
$icenv->db->setQuery("SELECT count(cmtid) FROM #__ice_comments WHERE$publ imgid = ".$this->_id);
$result = $icenv->db->query();
if ($result!==FALSE) {
$row = mysql_fetch_row($result);
if ($row!==FALSE) return $row[0];
}
return 0;
}
with
function getNumOfComments($list=true) {
global $icenv;
$icenv->db->setQuery("SELECT count(*) FROM #__jcomments WHERE object_group='ice' and object_id = ".$this->_id);
return $icenv->db->loadResult();
}
Open file /component/com_ice/galleryshow.php
Delete line:
$image->getComments(false);