I tried to make it work
but in each file with another id is the same comment I do not know what to do with it: (
in
/ index.php? option = com_channels & view = videos & vid = 100
is the same as well as in
/ index.php? com_channels option = & view = videos & vid = 500
I have added to this file
<?php
$comments = JPATH_SITE . DS .'components' . DS . 'com_jcomments' . DS . 'jcomments.php';
if (file_exists($comments)) {
require_once($comments);
echo JComments::showComments($id, 'com_movi', $title);
}
?>
I tried to add to jcomments / plugin file com_channels.plugin.php
This file does nothing
<?php
class jc_com_channels extends JCommentsPlugin {
function getObjectTitle( $id ) {
// Data load from database by given id
$db = & JFactory::getDBO();
$db->setQuery( "SELECT title FROM #__videos WHERE id='$id'");
return $db->loadResult();
}
function getObjectLink( $id ) {
// Itemid meaning of our component
$_Itemid = JCommentsPlugin::getItemid( 'com_channels' );
// url link creation for given object by id
$link = JRoute::_( "index.php?option=com_channels&view=videos&vid=".$vrow->id.");
return $link;
}
function getObjectOwner( $id ) {
$db = & JFactory::getDBO();
$db->setQuery( 'SELECT created_by, id FROM #__videos WHERE id = ' . $id );
return $db->loadResult();
}
}
?>
thank you