Hi,
the Jcomments 3.0.5 [01/08/2014] - is working with the new JD 3.x.x BUT the Comment Links / URL are wrong.
A little Workaround:
I will post here the code, that working for me (with SEF URLS) - The JComments Forum ist dead /only Spammer posts.
You must change the: /components/com_jcomments/plugins/com_jdownloads.plugin.php
old code:
<?php
/**
* JComments plugin for JDownloads objects support
*
* @version 2.3
* @package JComments
* @author Sergey M. Litvinov (smart@joomlatune.ru)
* @copyright (C) 2006-2013 by Sergey M. Litvinov (http://www.joomlatune.ru)
* @license GNU/GPL: http://www.gnu.org/copyleft/gpl.html
*/
defined('_JEXEC') or die;
class jc_com_jdownloads extends JCommentsPlugin
{
function getObjectInfo($id, $language = null)
{
$db = JFactory::getDBO();
$query = "SELECT file_id as id, file_title as title, submitted_by as owner, cat_id"
. " FROM #__jdownloads_files"
. " WHERE file_id = " . $id;
$db->setQuery($query);
$row = $db->loadObject();
$info = new JCommentsObjectInfo();
if (!empty($row)) {
$db->setQuery("SELECT id FROM #__menu WHERE link = 'index.php?option=com_jdownloads&view=viewcategory&catid=".$row->cat_id."' and published = 1");
$Itemid = $db->loadResult();
if (!$Itemid) {
$Itemid = self::getItemid('com_jdownloads');
}
$Itemid = $Itemid > 0 ? '&Itemid='.$Itemid : '';
$info->category_id = $row->cat_id;
$info->title = $row->title;
$info->userid = $row->owner;
$info->link = JRoute::_('index.php?option=com_jdownloads'.$Itemid.'&view=viewdownload&catid='.$row->cat_id.'&cid='.$id);
}
return $info;
}
}
new code for SEF URLs
<?php
/**
* JComments plugin for JDownloads objects support
*
* @version 2.3
* @package JComments
* @author Sergey M. Litvinov (smart@joomlatune.ru)
* @copyright (C) 2006-2013 by Sergey M. Litvinov (http://www.joomlatune.ru)
* @license GNU/GPL: http://www.gnu.org/copyleft/gpl.html
*/
defined('_JEXEC') or die;
class jc_com_jdownloads extends JCommentsPlugin
{
function getObjectInfo($id, $language = null)
{
$db = JFactory::getDBO();
$query = "SELECT file_id as id, file_title as title, submitted_by as owner, cat_id"
. " FROM #__jdownloads_files"
. " WHERE file_id = " . $id;
$db->setQuery($query);
$row = $db->loadObject();
$info = new JCommentsObjectInfo();
if (!empty($row)) {
$db->setQuery("SELECT id FROM #__menu WHERE link = 'index.php?option=com_jdownloads&view=category&cat_id=".$row->cat_id."' and published = 1");
$Itemid = $db->loadResult();
if (!$Itemid) {
$Itemid = self::getItemid('com_jdownloads');
}
$Itemid = $Itemid > 0 ? '&Itemid='.$Itemid : '';
$info->category_id = $row->cat_id;
$info->title = $row->title;
$info->userid = $row->owner;
$info->link = JRoute::_('/download/'.$row->cat_id.'/'.$id);
}
return $info;
}
}
Now make a refresh of the Comments i the joomla admin Interface:
component -> jcomments -> comments -> "Refresh Objects"
Hi Nyx,
i have the plugin reworked a little bit.
Please try the unzipped file below and post here your result.
When it is okay i will inform the developer from jcomments. ;)
[gelöscht durch Administrator]
Hi Arno,
sorry for my late answer.
I have tested it, it looks very good.
The urls are now better ;-)
Then forget my "Russian version" ;D
Hi,
thanks for your result.
I have contacted the jcomments developer.