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: Doesn't reload the page / show comment after clicking "Send"
Pages: [1]   Go Down
  Print  
Author Topic: Doesn't reload the page / show comment after clicking "Send"  (Read 1692 times)
0 Members and 1 Guest are viewing this topic.
xamire
Newbie
*

Karma: 0
Offline Offline

Posts: 3


« on: August 10, 2012, 01:31:25 »

I currently have Jcomments integrated with sobipro, but am having a problem with it.

When a user adds a comment, the list refreshes, but their post doesn't show up, and there is no confirmation about the post, until a user f5/refreshes the page manually. This leads to multiple posting, or being told they already posted, and confusing people. You can test this at this page http://www.xamire.com/felony-friendly/housing/832-El-Dorado-way (don't worry I'll delete test comments later.)

I'm currently using this implementation:

Quote
1. Open file /components/com_sobipro/usr/templates/default/entry/details.xsl
2. Find code (at the begin of file)::
Code: (xml)

<div style="clear:both;"></div>

and add:
Code: (xml)

         <xsl:variable name="EntryId">
            <xsl:value-of select="entry/@id" />
         </xsl:variable>
         <xsl:variable name="EntryName">
            <xsl:value-of select="entry/name" />
         </xsl:variable>

         <xsl:value-of select="php:function( 'TplFunctions::JComments' , $EntryId, $EntryName )" disable-output-escaping="yes" />


3. Open file /components/com_sobipro/usr/templates/default/template.php
4. Find code:
Code: (php)

   public static function Cfg(  $key, $def = null, $section = 'general'  )
   {
      return Sobi::Cfg( $key, $def, $section );
   }

and add after:
Code: (php)

   public static function JComments( $id, $title )
   {
           $result = '';
           $comments = JPATH_SITE.'/components/com_jcomments/jcomments.php';
       if (is_file($comments)) {
          require_once($comments);
          $result = JComments::show($id, 'com_sobipro', $title);
       }

      return $result;
   }


Also, how can i add this to the category as well as just the entry?
« Last Edit: August 11, 2012, 15:05:23 by xamire » Logged
ABTOP
Sr. Member
****

Karma: 17
Offline Offline

Posts: 398



WWW
« Reply #1 on: August 10, 2012, 02:45:53 »

"NetworkError: 500 Internal Server Error - http://www.xamire.com/component/jcomments/"
Logged

No personal messages unless you are a friend or you have money for me.
xamire
Newbie
*

Karma: 0
Offline Offline

Posts: 3


« Reply #2 on: August 10, 2012, 03:22:34 »

"NetworkError: 500 Internal Server Error - http://www.xamire.com/component/jcomments/"

Sorry about that, I was reloading the container.
Logged
Pages: [1]   Go Up
  Print  
JoomlaTune Support Forum    JComments component    Integration with third-party extensions    Topic: Doesn't reload the page / show comment after clicking "Send"
 
Jump to: