I'm sorry for my last post, I was not in the good forum

I began to do an implementation of the importation of comments made by yvComments (
http://yurivolkov.com/Joomla/yvComment/index_en.html) and I would like to have your advice. I changed only the admin.jcomments.migration.php file.
function updateCount modified :
function UpdateCount()
{
$db = & JCommentsFactory::getDBO();
if ($this->table != "#__yvcomment") {
$db->setQuery('SELECT COUNT(*) FROM ' . $this->table );
} else {
$db->setQuery('SELECT count( #__content.id ) FROM #__content, #__sections WHERE #__sections.alias=\'comments\' AND #__content.sectionid=#__sections.id');
}
$this->count = $db->loadResult();
}
Add
case 'yvcomment':
$cnt = JCommentsMigrationTool::importYvComment();
break;
in the doImport function
add this function next to the others
function importYvComment() {
$db = & JCommentsFactory::getDBO();
$db->setQuery("DELETE FROM #__jcomments WHERE source = 'yvcomment'");
$db->query();
$db->setQuery("SELECT #__content.id, #__content.fulltext, #__content.created_by, #__content.created_by_alias, #__content.parentid, #__content.created FROM #__content, #__sections WHERE #__sections.alias='comments' AND #__content.sectionid=#__sections.id");
$rows = $db->loadObjectList();
foreach( $rows as $row) {
$comment = new JCommentsDB( $db );
$comment->object_id = $row->parentid;
$comment->source = 'yvcomment';
$comment->userid = $row->created_by;
$comment->parent = 0;
$comment->name = JCommentsMigrationTool::processName( $row->created_by_alias );
$comment->username = JCommentsMigrationTool::processName( ($row->username != '' ? $row->username : $row->created_by_alias) );
$comment->published = 1;
$comment->date = $row->created;
$comment->object_group = "com_content";
$comment->comment = JCommentsMigrationTool::processComment( $row->fulltext);
$comment->lang = JCommentsInput::getParam($_POST, $comment->source . '_lang', '');
$user = null;
$query = "SELECT * FROM #__users WHERE email='$row->email' AND name='$row->name'";
$db->setQuery( $query );
if (JCOMMENTS_JVERSION == '1.5') {
$config = &JFactory::getConfig();
if($config->getValue('config.legacy')) {
$db->loadObject( $user );
} else {
$user = $db->loadObject();
}
} else {
$db->loadObject( $user );
}
if ( $user != null ) {
$comment->userid = $user->id;
}
$comment->store();
}
$db->setQuery("SELECT COUNT(*) FROM `#__jcomments` WHERE `source`= 'yvcomment'");
return $db->loadResult();
}
and finally add this to showImport in the class HTML_JCommentsMigrationTool
$CommentSystems[] = new JOtherCommentSystem(
'yvcomment'
, 'yvComment'
, 'Yuri Volkov'
, ''
, ''
, 'http://yurivolkov.com/'
, '#__yvcomment'
);