А что вам сударь не понятно, принцип создания такой же как и у достопочтенного wedal - создаете вкладки, а в них выводите формы для комментариев. По моему, все очень подробно расписано...
да расписано хорошо, а в К2 сделать не выходит. За вывод статьи отвечает файл item.php. Открываем и редактируем, форма комментариев (родная) выводиться следующим кодом
<!-- K2 Plugins: K2AfterDisplay -->
<?php echo $this->item->event->K2AfterDisplay; ?>
<?php if($this->item->params->get('itemComments') && ( ($this->item->params->get('comments') == '2' && !$this->user->guest) || ($this->item->params->get('comments') == '1'))):?>
<!-- K2 Plugins: K2CommentsBlock -->
<?php echo $this->item->event->K2CommentsBlock; ?>
<?php endif;?>
<?php if($this->item->params->get('itemComments') && !JRequest::getInt('print') && ($this->item->params->get('comments') == '1' || ($this->item->params->get('comments') == '2')) && empty($this->item->event->K2CommentsBlock)):?>
<!-- Item comments -->
<a name="itemCommentsAnchor" id="itemCommentsAnchor"></a>
<div class="itemComments">
<?php if($this->item->params->get('commentsFormPosition')=='above' && $this->item->params->get('itemComments') && !JRequest::getInt('print') && ($this->item->params->get('comments') == '1' || ($this->item->params->get('comments') == '2' && K2HelperPermissions::canAddComment($this->item->catid)))): ?>
<!-- Item comments form -->
<div class="itemCommentsForm">
<?php echo $this->loadTemplate('comments_form'); ?>
</div>
<?php endif; ?>
<?php if($this->item->numOfComments>0 && $this->item->params->get('itemComments') && !JRequest::getInt('print') && ($this->item->params->get('comments') == '1' || ($this->item->params->get('comments') == '2'))): ?>
<!-- Item user comments -->
<h3 class="itemCommentsCounter">
<span><?php echo $this->item->numOfComments; ?></span> <?php echo ($this->item->numOfComments>1)? JText::_('comments') : JText::_('comment'); ?>
</h3>
<ul class="itemCommentsList">
<?php foreach ($this->item->comments as $key=>$comment): ?>
<li class="<?php echo ($key%2)? "odd" : "even"; echo (!$this->item->created_by_alias && $comment->userID==$this->item->created_by)? " authorResponse" : ""; ?>">
<span class="commentLink">
<a href="<?php echo $this->item->link; ?>#comment<?php echo $comment->id; ?>" name="comment<?php echo $comment->id; ?>" id="comment<?php echo $comment->id; ?>">
<?php echo JText::_('Comment Link'); ?>
</a>
</span>
<?php if($comment->userImage):?>
<img src="<?php echo $comment->userImage; ?>" alt="<?php echo JFilterOutput::cleanText($comment->userName); ?>" width="<?php echo $this->item->params->get('commenterImgWidth'); ?>" />
<?php endif; ?>
<span class="commentDate">
<?php echo JHTML::_('date', $comment->commentDate, JText::_('DATE_FORMAT_LC2')); ?>
</span>
<span class="commentAuthorName">
<?php echo JText::_("posted by"); ?>
<?php if(!empty($comment->userLink)): ?>
<a href="<?php echo JFilterOutput::cleanText($comment->userLink); ?>" title="<?php echo JFilterOutput::cleanText($comment->userName); ?>" target="_blank" rel="nofollow">
<?php echo $comment->userName; ?>
</a>
<?php else: ?>
<?php echo $comment->userName; ?>
<?php endif; ?>
</span>
<p><?php echo $comment->commentText; ?></p>
<div class="clr"></div>
</li>
<?php endforeach; ?>
</ul>
<div class="itemCommentsPagination">
<?php echo $this->pagination->getPagesLinks(); ?>
<div class="clr"></div>
</div>
<?php endif; ?>
<?php if($this->item->params->get('commentsFormPosition')=='below' && $this->item->params->get('itemComments') && !JRequest::getInt('print') && ($this->item->params->get('comments') == '1' || ($this->item->params->get('comments') == '2' && K2HelperPermissions::canAddComment($this->item->catid)))): ?>
<!-- Item comments form -->
<div class="itemCommentsForm">
<?php echo $this->loadTemplate('comments_form'); ?>
</div>
<?php endif; ?>
<?php $user = &JFactory::getUser(); if ($this->item->params->get('comments') == '2' && $user->guest):?>
<div><?php echo JText::_('Login to post comments');?></div>
<?php endif; ?>
</div>
<?php endif; ?>
Замена на комментарии от Jcomments происходит при помощи плагина. Если поместить весь этот код во вкладку, то выскакивает либо синтаксическая ошибка либо вместо формы комментариев на странице выводиться текст этого кода. Вставлял вот так:
<?php
//Говорим Joomla, что мы хотим использовать панели
jimport('joomla.html.pane');
$myTabs = & JPane::getInstance('tabs', array('startOffset'=>0));
$output = '';
//Создаем панель для вкладок
$output .= $myTabs->startPane( 'pane' );
//Создаем 1 вкладку
$output .= $myTabs->startPanel( 'Jcomments', 'tab1' );
$output .= 'Приведенный выше код';
$output .= $myTabs->endPanel();
// Создаем 2 вкладку
$output .= $myTabs->startPanel( 'Вконтакте', 'tab2' );
$output .= 'Форма комментариев Вконтакте';
$output .= $myTabs->endPanel();
// Создаем 3 вкладку
$output .= $myTabs->startPanel( 'Facebook', 'tab3' );
$output .= 'Форма комментариев Facebook';
$output .= $myTabs->endPanel();
//окончание панели
$output .= $myTabs->endPane();
//Выводим
echo $output;
?>
Возможно не хватает знаний в PHP, что делаю не так? может кто подскажет?