This is the community forum. For a developer response use the Client Area.
Follow us on Facebook, Twitter and YouTube!

Integration with Joomla CMS
#1

Hi
Just wondering if there's any possibility of getting this plugin integrated with Joomla. I've actually been using it for a while on a Joomla site but we are facing the next Joomla upgrade and new PHP version, and when we last upgraded we could only get the older version of Commentics to work with Joomla 4.
Thanks
Jennie x
Reply
#2

Hi Jennie, I'm not familiar with Joomla but I'd be happy to try to help. Could you share your integration code?

I asked ChatGPT and it said for Joomla 3/4 you'd need to edit the /components/com_content/views/article/tmpl/default.php file and add this:

<?php
$cmtx_identifier = JUri::getInstance()->toString() ; // or another unique identifier
$cmtx_reference = $this->item->title;
$cmtx_folder = '/commentics/'; // path to Commentics folder
require(JPATH_ROOT . $cmtx_folder . 'frontend/index.php');
?>

And for Joomla 4/5 you'd need to edit the /override/layouts/com_content/article/default.php file and add this:

<?php
$cmtx_identifier = 'article_' . (int) $this->item->id;
$cmtx_reference = htmlspecialchars($this->item->title, ENT_QUOTES, 'UTF-8');
$cmtx_folder = '/commentics/'; // path to Commentics folder
require(\Joomla\CMS\Filesystem\Path::clean(JPATH_ROOT . $cmtx_folder . 'frontend/index.php'));
?>

Have you completed the interview?
Reply


Possibly Related Threads…
Thread / Author Replies Views Last Post
Last Post by paulkienitz
06-Dec-2024, 08:53 PM
Last Post by Steven
15-Oct-2024, 10:51 AM
Last Post by nsuomine
20-Jan-2023, 08:32 AM
Last Post by Steven
23-Jan-2019, 02:07 PM
Last Post by news
18-Dec-2017, 09:15 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)