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:
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?