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: Jcomments + Ezrealty
Pages: [1]   Go Down
  Print  
Author Topic: Jcomments + Ezrealty  (Read 3395 times)
0 Members and 2 Guests are viewing this topic.
skifun
Newbie
*

Karma: 0
Offline Offline

Posts: 1


« on: February 18, 2010, 03:58:22 »

Hello there

have downloaded and installed successfully latest jcomments version and hoped to work with ezrealty component, but no luck.
New jcomment version says supporting ezrealty (mine ezrealty installation is 5.4.3) and indeed I can see a file called com_ezrealty.plugin.php in plugins folder.

What should I do to enable it ?
Need any customization to do it by hand ?

thanks for your patience

have a good time
Logged
ath
Newbie
*

Karma: 0
Offline Offline

Posts: 4


« Reply #1 on: August 13, 2010, 14:31:34 »

First of all thanks for the free and great component.

I was looking for this solution for a long time now and i am stuck at this moment.
I have ezrealty 5.4.6 and Jcomments 2.2.0.0


I insert the below code in ezrealty.html.php and the comment form is there beautifully on each ezrealty listing.
Code:
<?php
  
global $mosConfig_absolute_path;
  
$comments $mosConfig_absolute_path '/components/com_jcomments/jcomments.php';
  if (
file_exists($comments)) {
    require_once(
$comments);
    echo 
JComments::showComments($id'com_ezrealty'$adline);
  }
?>
My problem is that when i write a comment the plugin does not assign an object_id(it assigns 0 to all) to the comment so on each ezrealty listing all comments are showing and not just the ones for each listing.

Any help on this

Logged
smart
Administrator
Hero Member
*****

Karma: 160
Offline Offline

Gender: Male
Posts: 2559



WWW
« Reply #2 on: August 13, 2010, 15:06:10 »

@ath: it sounds like you've some error in code - the $id variable seems to be not initialized. You need investigate code before this block and found what variable contain ID of current item.
Logged

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

Karma: 0
Offline Offline

Posts: 4


« Reply #3 on: August 16, 2010, 13:43:27 »

Thanks for your reply.

from my limited knowledge i am almost sure that the ID of the current item is carried in the jos_ezrealty as $id and the title as $adline but i dont know how to initialize it.

So i am really stuck here.Any help would be appreciated.

Below is the code i use in the ezrealty.html.php to show the comments in ezrealty component:
Code:
<?php
  
global $mosConfig_absolute_path;
  
$comments $mosConfig_absolute_path '/components/com_jcomments/jcomments.php';
  if (
file_exists($comments)) {
    require_once(
$comments);
    echo 
JComments::showComments($id'com_ezrealty'$adline);
  }
?>

and here is the code in the jcomments plugin for ezrealty:
Code:
<?php

/**

 * JComments plugin for EzRealty 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_ezrealty extends JCommentsPlugin

{

function getTitles($ids)

{

$db = & JCommentsFactory::getDBO();

$db->setQuery'SELECT id, adline as title FROM #__ezrealty WHERE id IN (' implode(','$ids) . ')' );

return $db->loadObjectList('id');

}



function getObjectTitle($id)

{

$db = & JCommentsFactory::getDBO();

$db->setQuery'SELECT adline, id FROM #__ezrealty WHERE id = ' $id );

return $db->loadResult();

}



function getObjectLink($id)

{

$_Itemid JCommentsPlugin::getItemid('com_ezrealty');

$link JoomlaTuneRoute::_('index.php?option=com_ezrealty&amp;task=detail&amp;id=' $id '&amp;Itemid=' $_Itemid);

return $link;

}



function getObjectOwner($id)

{

$db = & JCommentsFactory::getDBO();

$db->setQuery'SELECT owner FROM #__ezrealty WHERE id = ' $id );

$userid = (int) $db->loadResult();



return $userid;

}

}

?>
Logged
ath
Newbie
*

Karma: 0
Offline Offline

Posts: 4


« Reply #4 on: August 18, 2010, 14:17:32 »

Just found the solution.


Below code should be placed in the details template of ezrealty that you are using(components/com_ezrealty/forms/templates):

find at the bottom of viewdetails.ezrealty.php:
Code:
<?php
if ($er_jreviews && file_exists("components/com_jreviews/jreviews/controllers/components/everywhere/everywhere_com_ezrealty_property.php")){
?>

<table border="0" cellpadding="5" cellspacing="0" width="100%">
<tr>
<td>
<?php
echo $jreDetail['output']; // review form and reviews
?>

</td>
</tr>
</table>

and replace with

Code:
<?php
  
global $mosConfig_absolute_path;
  
$comments $mosConfig_absolute_path '/components/com_jcomments/jcomments.php';
  if (
file_exists($comments)) {
    require_once(
$comments);
    echo 
JComments::showComments($row->id'com_ezrealty'$row->adline);
  }
?>

<?php
if ($er_jreviews && file_exists("components/com_jreviews/jreviews/controllers/components/everywhere/everywhere_com_ezrealty_property.php")){
?>

<table border="0" cellpadding="5" cellspacing="0" width="100%">
<tr>
<td>
<?php
echo $jreDetail['output']; // review form and reviews
?>

</td>
</tr>
</table>
Logged
dingbusan
Newbie
*

Karma: 0
Offline Offline

Posts: 1


« Reply #5 on: August 05, 2011, 19:11:57 »

First of all thanks for the free and great component.

I was looking for this solution for a long time now and i am stuck at this moment.
I have ezrealty 5.4.6 and Jcomments 2.2.0.0


I insert the below code in ezrealty.html.php and the comment form is there beautifully on each ezrealty listing.
Code:
<?php
  
global $mosConfig_absolute_path;
  
$comments $mosConfig_absolute_path '/components/com_jcomments/jcomments.php';
  if (
file_exists($comments)) {
    require_once(
$comments);
    echo 
JComments::showComments($id'com_ezrealty'$adline);
  }
?>
My problem is that when i write a comment the plugin does not assign an object_id(it assigns 0 to all) to the comment so on each ezrealty listing all comments are showing and not just the ones for each listing.

Any help on this



Hi Ath, Could u pls kindly advise where I can located the "ezrealty.html.php" file? thanks very much!
Logged
ath
Newbie
*

Karma: 0
Offline Offline

Posts: 4


« Reply #6 on: August 05, 2011, 19:58:20 »

Go to com_ezrealty/forms/templates/the template you are using/viewdetails.ezrealty.php



FOR EZREALTY 6
at the end of the code after     <!--END CUSTOMER LINKS BLOCK--> replace all code with
Code:
<tr>
                    <td>&nbsp;</td>
                </tr>
                <tr>
                    <td>&nbsp;</td>
                </tr>
            </table>
        </td>
    </tr>
</table>
 <?php
  $comments 
JPATH_SITE DS .'components' DS 'com_jcomments' DS 'jcomments.php';
  if (
file_exists($comments)) {
    require_once(
$comments);
    echo 
JComments::showComments($row->id'com_ezrealty'$row->adline);
  }


if (
Configure::get('er_jreviews') && file_exists("components/com_jreviews/jreviews/controllers/components/everywhere/everywhere_com_ezrealty_property.php")) {
    
?>

<table border="0" cellpadding="5" cellspacing="0" width="100%">
    <tr>
        <td>
    <?php
    
echo $jreDetail['output']; // review form and reviews
    
?>

        </td>
    </tr>
</table>
    <?php
}
?>


FOR EZREALTY 5
at the end of the code after     <!--END NEW BOTTOM STUFF--> replace all code with
Code:
</td>
</tr>
</table>


</div>


</td>
</tr>
</table>
<?php
  
global $mosConfig_absolute_path;
  
$comments $mosConfig_absolute_path '/components/com_jcomments/jcomments.php';
  if (
file_exists($comments)) {
    require_once(
$comments);
    echo 
JComments::showComments($row->id'com_ezrealty'$row->adline);
  }
?>

<?php
if ($er_jreviews && file_exists("components/com_jreviews/jreviews/controllers/components/everywhere/everywhere_com_ezrealty_property.php")){
?>

<table border="0" cellpadding="5" cellspacing="0" width="100%">
<tr>
<td>
<?php
echo $jreDetail['output']; // review form and reviews
?>

</td>
</tr>
</table>
<?php
}
?>
Logged
Pages: [1]   Go Up
  Print  
JoomlaTune Support Forum    JComments component    Integration with third-party extensions    Topic: Jcomments + Ezrealty
 
Jump to: