Thanks for your reply.
from my limited knowledge i am almost sure that the ID of the current item is carried in the jos_ezrealty as $id and the title as $adline but i dont know how to initialize it.
So i am really stuck here.Any help would be appreciated.
Below is the code i use in the ezrealty.html.php to show the comments in ezrealty component:
<?php
global $mosConfig_absolute_path;
$comments = $mosConfig_absolute_path . '/components/com_jcomments/jcomments.php';
if (file_exists($comments)) {
require_once($comments);
echo JComments::showComments($id, 'com_ezrealty', $adline);
}
?>
and here is the code in the jcomments plugin for ezrealty:
<?php
/**
* JComments plugin for EzRealty objects support
*
* @version 2.0
* @package JComments
* @author Sergey M. Litvinov (smart@joomlatune.ru)
* @copyright (C) 2006-2009 by Sergey M. Litvinov (http://www.joomlatune.ru)
* @license GNU/GPL: http://www.gnu.org/copyleft/gpl.html
**/
class jc_com_ezrealty extends JCommentsPlugin
{
function getTitles($ids)
{
$db = & JCommentsFactory::getDBO();
$db->setQuery( 'SELECT id, adline as title FROM #__ezrealty WHERE id IN (' . implode(',', $ids) . ')' );
return $db->loadObjectList('id');
}
function getObjectTitle($id)
{
$db = & JCommentsFactory::getDBO();
$db->setQuery( 'SELECT adline, id FROM #__ezrealty WHERE id = ' . $id );
return $db->loadResult();
}
function getObjectLink($id)
{
$_Itemid = JCommentsPlugin::getItemid('com_ezrealty');
$link = JoomlaTuneRoute::_('index.php?option=com_ezrealty&task=detail&id=' . $id . '&Itemid=' . $_Itemid);
return $link;
}
function getObjectOwner($id)
{
$db = & JCommentsFactory::getDBO();
$db->setQuery( 'SELECT owner FROM #__ezrealty WHERE id = ' . $id );
$userid = (int) $db->loadResult();
return $userid;
}
}
?>