Mi servirebbe capire come poter integrare jcomments con il componente in questione.
Ho seguito la loro guida:
http://www.joomlatune.com/jcomments-developers-manual.htmlDopo di che ho creato il seguente file nominadolo come suggeritomi "com_simplefilemanager.plugin.php" :
<?php
class jc_com_simplefilemanager extends JCommentsPlugin {
function getObjectTitle( $id ) {
// Data load from database by given id
$db = & JFactory::getDBO();
$db->setQuery( "SELECT title FROM #__simplefilemanager WHERE id='$id'");
return $db->loadResult();
}
function getObjectLink( $id ) {
// Itemid meaning of our component
$_Itemid = JCommentsPlugin::getItemid( 'com_simplefilemanager' );
// url link creation for given object by id
$link = JRoute::_( 'index.php?option=com_simplefilemanager&task=view&id='. $id .'&Itemid='. $_Itemid );
return $link;
}
function getObjectOwner( $id ) {
$db = & JFactory::getDBO();
$db->setQuery( 'SELECT created_by, id FROM #__simplefilemanager WHERE id = ' . $id );
return $db->loadResult();
}
}
?>
Poi come sempre suggeritomi dalla guida per mostrare i commenti, ho incollato alla riga 79 del seguente file components/com_simplefilemanager/views/simplefilemanager questo codice:
$comments = JPATH_SITE . DS .'components' . DS . 'com_jcomments' . DS . 'jcomments.php';
if (file_exists($comments)) {
require_once($comments);
echo JComments::showComments($id, 'com_simplefilemanager', $title);
Purtroppo tale procedimento sembra non funzionare. Ecco chi può aiutarmi ad integrare Jcomments con com_simplefilemanager.
Grazie a coloro che vorranno aiutarmi.