Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length

JoomlaTune Support Forum    JComments component    Integration with third-party extensions    Topic: Zoo V.2.3.0 Jcomment integration
Pages: [1]   Go Down
  Print  
Author Topic: Zoo V.2.3.0 Jcomment integration  (Read 4796 times)
0 Members and 1 Guest are viewing this topic.
skoc65
Newbie
*

Karma: 0
Offline Offline

Posts: 4


Email
« on: December 23, 2010, 19:59:24 »

My English is bad, I apologize. I have integrated the component. But, the administration panel, and the latest reviews modul titles does not.



and




Please help me...
Logged
smart
Administrator
Hero Member
*****

Karma: 163
Offline Offline

Gender: Male
Posts: 2161



WWW
« Reply #1 on: December 23, 2010, 21:08:26 »

1. Open file /components/com_jcomments/plugins/om_zoo.plugin.php
2. Replace:
Code: (php)
$db->setQuery( 'SELECT id, name as title FROM #__zoo_core_item WHERE id IN (' . implode(',', $ids) . ')' );
with
Code: (php)
$db->setQuery( 'SELECT id, name as title FROM #__zoo_item WHERE id IN (' . implode(',', $ids) . ')' );
3. Replace:
Code: (php)
$db->setQuery('SELECT name, id FROM #__zoo_core_item WHERE id = ' . $id);
with
Code: (php)
$db->setQuery('SELECT name, id FROM #__zoo_item WHERE id = ' . $id);
4. Replace:
Code: (php)
$db->setQuery("SELECT created_by, id FROM #__zoo_core_item WHERE id = " . $id);
with
Code: (php)
$db->setQuery("SELECT created_by, id FROM #__zoo_item WHERE id = " . $id);
5. Replace:
Code: (php)
$link = 'index.php?option=com_zoo&view=item&item_id='. $id;

require_once(JPATH_SITE.DS.'includes'.DS.'application.php');

$component = & JComponentHelper::getComponent('com_zoo');
$menus = & JSite::getMenu();
$items = $menus->getItems('componentid', $component->id);

if (count($items)) {
$link .= "&Itemid=" . $items[0]->id;
}

$link = JRoute::_($link);
return $link;
with

Code: (php)
require_once(JPATH_ADMINISTRATOR.'/components/com_zoo/config.php');
$db = & JFactory::getDBO();
$db->setQuery('SELECT * FROM #__zoo_item WHERE id = ' . $id);
$item = $db->loadObject();
$link = RouteHelper::getItemRoute($item);
return $link;
Logged

If you use JComments, please post a rating and a review at the Joomla! Extensions Directory
skoc65
Newbie
*

Karma: 0
Offline Offline

Posts: 4


Email
« Reply #2 on: December 24, 2010, 01:46:27 »

Thank you very much. Now we seem to titles. Com_zoo.plugin.php created;

Code:
<?php
/**
 * JComments plugin for Zoo (zoo.yootheme.com) 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_zoo extends JCommentsPlugin
{
function getTitles($ids)
{
$db = & JFactory::getDBO();
$db->setQuery'SELECT id, name as title FROM #__zoo_item WHERE id IN (' implode(','$ids) . ')' );
return $db->loadObjectList('id');
}

function getObjectTitle($id)
{
$db = & JCommentsFactory::getDBO();
$db->setQuery('SELECT name, id FROM #__zoo_item WHERE id = ' $id);
return $db->loadResult();
}

function getObjectLink($id)
{
$link 'index.php?option=com_zoo&view=item&item_id='$id;

require_once(JPATH_SITE.DS.'includes'.DS.'application.php');

$component = & JComponentHelper::getComponent('com_zoo');
$menus = & JSite::getMenu();
$items $menus->getItems('componentid'$component->id);

if (count($items)) {
$link .= "&Itemid=" $items[0]->id;
}

$link JRoute::_($link);
return $link;
}

function getObjectOwner($id)
{
$db = & JFactory::getDBO();
$db->setQuery("SELECT created_by, id FROM #__zoo_item WHERE id = " $id);
$userid $db->loadResult();

return intval($userid);
}
}
?>

But now there's a small problem.Last comments modul wants to sign the link is clicked. Visitors will not let go of the article from there.





In the address bar;

index.php?option=com_user&view=login&return=aHR0cDovL3d3dy5nb21lYy5pbmZvL2VtZWtsaS9pbmRleC5waHA/b3B0aW9uPWNvbV96b28mdmlldz1pdGVtJml0ZW1faWQ9MSZJdGVtaWQ9MjE=#comment-9

thank you....
Logged
smart
Administrator
Hero Member
*****

Karma: 163
Offline Offline

Gender: Male
Posts: 2161



WWW
« Reply #3 on: December 24, 2010, 02:35:47 »

Thank you very much. Now we seem to titles. Com_zoo.plugin.php created;
You've missed step 5...
Logged

If you use JComments, please post a rating and a review at the Joomla! Extensions Directory
skoc65
Newbie
*

Karma: 0
Offline Offline

Posts: 4


Email
« Reply #4 on: December 24, 2010, 03:26:18 »

yeah. 5.step did. but has failed. So this is I had to abort ....

com_zoo.plugin.php;

Code:
<?php
/**
 * JComments plugin for Zoo (zoo.yootheme.com) 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_zoo extends JCommentsPlugin
{
function getTitles($ids)
{
$db = & JFactory::getDBO();
$db->setQuery'SELECT id, name as title FROM #__zoo_item WHERE id IN (' implode(','$ids) . ')' );
return $db->loadObjectList('id');
}

function getObjectTitle($id)
{
$db = & JCommentsFactory::getDBO();
$db->setQuery('SELECT name, id FROM #__zoo_item WHERE id = ' $id);
return $db->loadResult();
}

function getObjectLink($id)
{
require_once (JPATH_ADMINISTRATOR.'/components/com_zoo/config.php');
$db = & JFactory::getDBO();
$db->setQuery('SELECT * FROM #__zoo_item WHERE id = ' $id);
$item $db->loadObject();
$link RouteHelper::getItemRoute($item);
return $link;
}

function getObjectOwner($id)
{
$db = & JFactory::getDBO();
$db->setQuery("SELECT created_by, id FROM #__zoo_item WHERE id = " $id);
$userid $db->loadResult();

return intval($userid);
}
}
?>

and

« Last Edit: December 24, 2010, 03:30:34 by skoc65 » Logged
smart
Administrator
Hero Member
*****

Karma: 163
Offline Offline

Gender: Male
Posts: 2161



WWW
« Reply #5 on: December 26, 2010, 15:09:23 »

Hm... strange. Could you check you server's error log? Seems some error has been occured. I'll try to reproduce this error on my test site too.
Logged

If you use JComments, please post a rating and a review at the Joomla! Extensions Directory
skoc65
Newbie
*

Karma: 0
Offline Offline

Posts: 4


Email
« Reply #6 on: December 26, 2010, 20:49:44 »

While this problem applies only registered members can write posts. Visitors can access the module if you can write posts.

Note: Googletranslate Thank you Smiley
Logged
Pages: [1]   Go Up
  Print  
JoomlaTune Support Forum    JComments component    Integration with third-party extensions    Topic: Zoo V.2.3.0 Jcomment integration
 
Jump to: