
In Phoca config file -
config.xml,
if Phoca Gallery installed - /administrator/components/com_phocagallery/config.xml
Change:
Code: Select all
<param name="display_comment" type="list" default="0" label="Display Comment" description="Display Comment DESC">
<option value="0">No</option>
<option value="1">Yes</option>
</param>
Code: Select all
<param name="display_comment" type="list" default="0" label="Display Comment" description="Display Comment DESC">
<option value="0">No</option>
<option value="1">Yes, built-in Phoca</option>
<option value="2">Yes, use JComments (if installed)</option>
</param>
2. In category template file -
category/tmpl/default.php
in "com_phocagallery_v2.2.4.zip" - front/views/category/tmpl/default.php
if Phoca Gallery installed - /components/com_phocagallery/views/category/tmpl/default.php
Change:
Code: Select all
if ((int)$this->tmpl['displaycomment'] == 1) {
echo $pane->startPanel( JHTML::_( 'image.site', 'components/com_phocagallery/assets/images/icon-comment.'.$this->tmpl['formaticon'],'', '', '', '', '') . ' '.JText::_('Comments'), 'comments' );
echo $this->loadTemplate('comments');
echo $pane->endPanel();
}
Code: Select all
if ((int)$this->tmpl['displaycomment'] == 1) {
echo $pane->startPanel( JHTML::_( 'image.site', 'components/com_phocagallery/assets/images/icon-comment.'.$this->tmpl['formaticon'],'', '', '', '', '') . ' '.JText::_('Comments'), 'comments' );
echo $this->loadTemplate('comments');
echo $pane->endPanel();
} elseif ((int)$this->tmpl['displaycomment'] == 2) {
echo $pane->startPanel( JHTML::_( 'image.site', 'components/com_phocagallery/assets/images/icon-comment.'.$this->tmpl['formaticon'],'', '', '', '', '') . ' '.JText::_('Comments'), 'comments_jc' );
echo '<div id="phocagallery-comments">';
echo '<div style="font-size:1px;height:1px;margin:0px;padding:0px;"> </div>';//because of IE bug
$comments = JPATH_SITE.DS.'components'.DS.'com_jcomments'.DS.'jcomments.php';
if (is_file($comments)) {
require_once($comments);
echo JComments::showComments($this->category->id, 'com_phocagallery', $this->category->title);
}
echo '</div>';
echo $pane->endPanel();
}
3. If your version of JComments lower then 2.1.0 (2.1.0 currently RC version, current public version 2.0.0.x) - copy attachment to this message plugin (unzip first) to directory "/components/com_jcomments/plugins".
This plugin built-in to JComments 2.1.0.x
4. In Phoca Gallary params select "Yes, use JComments (if installed)" for "Display Comment"
5. Test and write this.
With Best Regards, joomlatune.com/joomlatune.ru
P.S> Tested on Joomla 1.5.10 / Phoca Gallery 2.2.4 / JComments 2.0.0.x - JComments 2.1.0 RC