But it seems that "show latest commented content" doesn't work for phocagallery...
Yes, because it works only with com_content's articles. I couldn't make same function for all other extensions because it will require include in module too much SQL-queries for each extension.
Hi,i try change /components/com_jcomments/plugins/com_jcomments.plugin.php for get active link to phocagalery. It is partly functional, but only for categories comments (jump into comment, but presently re-jump into right category). Also I am not sure about future issues. Please can you check it? Active link are builded only when new com_jcomments.plugin.php present in /components/com_jcomments/plugins/
THX

original
function getMenuItem($id)
{
$db = & JCommentsFactory::getDBO();
$query = "SELECT m.*"
. "\nFROM `#__menu` AS m"
. "\nJOIN `#__components` AS c ON c.id = m.componentid"
. "\nWHERE m.type = 'component'"
. "\nAND c.option = 'com_jcomments'"
. "\nAND c.parent = 0"
. "\nAND m.params LIKE '%object_id=" . $id . "%'"
;
$db->setQuery($query);
$menus = $db->loadObjectList();
if (count($menus)) {
return $menus[0];
} else {
return null;
}
}
modified
function getMenuItem($id)
{
$db = & JCommentsFactory::getDBO();
$query = "SELECT m.*"
. "\nFROM `#__menu` AS m"
. "\nJOIN `#__components` AS c ON c.id = m.componentid"
. "\nWHERE m.type = 'component'"
. "\nAND ( c.option = 'com_jcomments' or c.option Like 'com_phoca%')"
. "\nAND c.parent = 0"
;
$db->setQuery($query);
$menus = $db->loadObjectList();
if (count($menus)) {
return $menus[0];
} else {
return null;
}
}