1. Open file sub_viewdetails.php find lines:
if ( $ag_showcomment && !$slideshow ) {
HTML_ponygallery2::ShowCommentsHead($allowcomment);
if ( $ag_showcommentsarea == 2 ) {
HTML_ponygallery2::ShowCommentsArea($allowcomment);
HTML_ponygallery2::BuildCommentsForm($allowcomment);
} else {
HTML_ponygallery2::BuildCommentsForm($allowcomment);
HTML_ponygallery2::ShowCommentsArea($allowcomment);
}
}
and replace with
global $mainframe;
$comments = $mainframe->getCfg('absolute_path') . '/components/com_jcomments/jcomments.php';
if (file_exists($comments)) {
require_once($comments);
echo JComments::showComments($id, 'com_ponygallery', $imgtitle);
}
2. Open file ponygallery.php find lines:
$database->setQuery("DELETE
FROM #__ponygallery_comments
WHERE cmtpic=$uid");
and replace with:
$database->setQuery("DELETE
FROM #__jcomments
WHERE object_id=$uid and object_group='com_ponygallery'");
3. Open file ponygallery.html.php find lines:
# Check how many comments exist
$database->setQuery("SELECT cmtid
FROM #__ponygallery_comments
WHERE cmtpic='$row1->id'");
$comments_result = $database->query();
$comments = mysql_num_rows($comments_result);
and replace with
global $mainframe;
$comments = $mainframe->getCfg('absolute_path') . '/components/com_jcomments/jcomments.php';
if (file_exists($comments)) {
require_once($comments);
$comments = JComments::getCommentsCount($id, 'com_ponygallery');
} else {
$comments = 0;
}