Integration of JComments to AlphaContent
|
AlphaContent - Joomla component displaying the information about given sections/categories in Yahoo style view or Yandex main page. Supports the possbility of alphabet sort and a lot of view customizations settings. The given integration will add the JComments to list of supported by component comment systems.
- Open file /components/com_alphacontent/alphacontent.html.php
- Find the following lines:
if ( $config->ac_commentsystem!='combo' ) {
$database->setQuery( "SELECT count(*) FROM #__".$config->ac_commentsystem." WHERE contentid='$row->id' AND published='1'" );
$rowscomment = intval( $database->loadResult() );
} elseif ( $config->ac_commentsystem=='combo' ) {
$database->setQuery("SELECT COUNT(*) FROM #__content_comments WHERE articleid = '$row->id'");
$rowscomment = intval( $database->loadResult() );
}
and replace with:
if ( $config->ac_commentsystem!='combo' ) {
$database->setQuery( "SELECT count(*) FROM #__".$config->ac_commentsystem." WHERE contentid='$row->id' AND published='1'" );
$rowscomment = intval( $database->loadResult() );
} elseif ( $config->ac_commentsystem=='combo' ) {
$database->setQuery("SELECT COUNT(*) FROM #__content_comments WHERE articleid = '$row->id'");
$rowscomment = intval( $database->loadResult() );
} elseif ( $config->ac_commentsystem=='jcomments' ) {
global $mosConfig_absolute_path;
$comments = $mosConfig_absolute_path . '/components/com_jcomments/jcomments.php';
if (file_exists($comments)) {
require_once($comments);
$rowscomment = JComments::getCommentsCount($row->id, 'com_content');
}
}
- Open file /administrator/components/com_alphacontent/admin.alphacontent.html.php
- Find the following links:
$boxcomment[] = mosHTML::makeOption( 'combo', 'ComboLITE / ComboMAX' );
and add after:
$boxcomment[] = mosHTML::makeOption( 'jcomments', 'JComments' );
See also:
|