Integrate Akeeba Engage Comment System into Third-Party Components?
Can Akeeba Engage be integrated into third-party components, similar to how JComments can be embedded? Here is an example of how it is done with JComments:
if (JComponentHelper::isEnabled('com_jcomments', true)):
include_once(JPATH_BASE.DS.'components'.DS.'com_jcomments'.DS.'jcomments.php');
echo JComments::showComments($file_id, 'com_meetings', $file_id);
endif;
Is there a way to achieve the same functionality with Akeeba Engage?
Thank you for this great component! 😊🙏
The short answer is no. As noted in the README:
Akeeba Engage is a simple comment solution for Joomla. It is meant to be used with core content (articles) only.
There is no intention of supporting non-core content.
The major goal of Engage was to make a lightning fast commenting system for core Joomla! articles. By supporting only core content we can do that because a lot of assumptions are made for us such as being able to use asset IDs to refer to content items, using core content events to display comments / comment counts, being able to use configuration cascading between the component, content categories, and articles, generating management links given just an asset ID and so on.
Supporting different components would require throwing away all code in Engage and starting from scratch. However, there would be a major problem. It would NOT be fast, and it would not be automatically integrated into core content.
It wouldn't be fast because each comment would need a composite key (a varchar with the component name, and a bigint with the content ID) which is at least an order of magnitude slower than using a bigint index like we do now.
All of the internal features such as cascading configuration, links, comment list display etc would require roundtrips to the database per comment which would make the interface between 10 and 100 times slower – and we're starting at around 100 msec, so you can do the math.
Having to display and manage comments across different components also means that we can no longer use Joomla's content events. We'd need a different method for each extension. The best performance would be template overrides which would make the component useless for 99% of the users out there who just want comments on their articles without having to fiddle around with .php file editing and updating. This is why other extensions end up doing stupid crap with AJAX which doesn't work well for search engine indexing, AMP etc.
This is why I am not interested in making a generic comments solution. That is a solved problem by other people. What nobody had made yet was a lightning fast core content comments solution. That's the problem I solved. I would also hope that at some point Joomla! would include this code in the core, but nobody is interested in it so yeah.
Thank you, @nikosdion