RD Autos is a Joomla component for listing vehicles for sale, it lacks a comment section. See this example of the current page structure: Muscle Cars
muscle--cars.com/buick-street-rodI have already created the following and placed in jcomments plugin folder and rdautos component, not sure of the next steps though. RD Autos author site is rd-media.org
<?php
class jc_com_rdautos extends JCommentsPlugin {
function getObjectTitle( $id ) {
// Data load from database by given id
$db = & JFactory::getDBO();
$db->setQuery( "SELECT title FROM #__rdautos WHERE id='$id'");
return $db->loadResult();
}
function getObjectLink( $id ) {
// Itemid meaning of our component
$_Itemid = JCommentsPlugin::getItemid( 'com_rdautos' );
// url link creation for given object by id
$link = JRoute::_( 'index.php?option=com_rdautos&task=view&id='. $id .'&Itemid='. $_Itemid );
return $link;
}
function getObjectOwner( $id ) {
$db = & JFactory::getDBO();
$db->setQuery( 'SELECT created_by, id FROM #__rdautos WHERE id = ' . $id );
return $db->loadResult();
}
}
?>