Hello,
I want to remove K2 comments and let a Facebook plugin comment as a option for comments.
But I cant figure out how to do it...
I disable com from K2 but its disabling and plugin comments too...
Any idea?
Disable K2 comments
loukasgr
Hi,
Is there any cache settings on your server side?
I tried to disable the comment option in the settings of category 'Reviews' but no affect on front-end: http://prntscr.com/l98z7z
Hello aman204 ,
BT Social Share Im using for Facebook share and comment.
When I turn off the comments from K2 Category, this plugin not showing anywhere I dont see even Share...
When I turn on the comments from K2 Category, this plugin showing and work fine, but I dont want the K2 comment ...
Content - BT Social Share
[upl-image-preview url=https://www.joomlart.com/forums/assets/files/2018-10-23/1540316599-918425-screenshot-6.png]
- Edited
loukasgr When I turn on the comments from K2 Category, this plugin showing and work fine, but I dont want the K2 comment ...
You can hide the K2 comments section through CSS by adding this to custom.css file and still have the plugin shown :
.bt_facebook_comment, div.itemCommentsForm{display:none;}
However, For having more permanent solution and ensuring that the functionality to not show comments doesnt cause hinderance for the BT plugin, You may post for this in K2 forums ever since the specific layout rendering is coming through K2 extension
Hello teitbite ,
Can you help me with what exactly I need to delete?
<!-- K2 Plugins: K2CommentsBlock -->
<?php echo $this->item->event->K2CommentsBlock; ?>
<?php endif; ?>
<?php if(
$this->item->params->get('itemComments') &&
($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') && ($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::_('K2_COMMENTS') : JText::_('K2_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" : ""; echo($comment->published) ? '':' unpublishedComment'; ?>">
<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::_('K2_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::_('K2_DATE_FORMAT_LC2')); ?></span>
<span class="commentAuthorName">
<?php echo JText::_('K2_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>
<?php if(
$this->inlineCommentsModeration ||
($comment->published && ($this->params->get('commentsReporting')=='1' || ($this->params->get('commentsReporting')=='2' && !$this->user->guest)))
): ?>
<span class="commentToolbar">
<?php if($this->inlineCommentsModeration): ?>
<?php if(!$comment->published): ?>
<a class="commentApproveLink" href="<?php echo JRoute::_('index.php?option=com_k2&view=comments&task=publish&commentID='.$comment->id.'&format=raw')?>"><?php echo JText::_('K2_APPROVE')?></a>
<?php endif; ?>
<a class="commentRemoveLink" href="<?php echo JRoute::_('index.php?option=com_k2&view=comments&task=remove&commentID='.$comment->id.'&format=raw')?>"><?php echo JText::_('K2_REMOVE')?></a>
<?php endif; ?>
<?php if($comment->published && ($this->params->get('commentsReporting')=='1' || ($this->params->get('commentsReporting')=='2' && !$this->user->guest))): ?>
<a data-k2-modal="iframe" href="<?php echo JRoute::_('index.php?option=com_k2&view=comments&task=report&commentID='.$comment->id)?>"><?php echo JText::_('K2_REPORT')?></a>
<?php endif; ?>
<?php if($comment->reportUserLink): ?>
<a class="k2ReportUserButton" href="<?php echo $comment->reportUserLink; ?>"><?php echo JText::_('K2_FLAG_AS_SPAMMER'); ?></a>
<?php endif; ?>
</span>
<?php endif; ?>
<div class="clr"></div>
</li>
<?php endforeach; ?>
</ul>
<!-- Comments Pagination -->
<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 class="itemCommentsLoginFirst"><?php echo JText::_('K2_LOGIN_TO_POST_COMMENTS'); ?></div>
<?php endif; ?>
</div>
<?php endif; ?>
<?php if(!JRequest::getCmd('print')): ?>
<div class="itemBackToTop">
<a class="k2Anchor" href="<?php echo $this->item->link; ?>#startOfPageId<?php echo JRequest::getInt('id'); ?>">
<?php echo JText::_('K2_BACK_TO_TOP'); ?>
</a>
</div>
<?php endif; ?>
<div class="clr"></div>
</div>
loukasgr Can you also add your ftp details in edit fields in order for us to take closer look.
For reference, You can follow thread post (5 point) procedure.
- Edited
loukasgr Sorry for problem with ftp , I change pass and seems all ok
The ftp details are working now however, The specific page entered in edit fields for which edits have been sought for, is now returning with 404 error henceforth, the modifications being done to specific file wont reflect due to specific page not rendering currently. Kindly check or you may let us know some other page where the specific menu type is being rendered from the site
- Edited
loukasgr As apparently seen, BT Social share plugin can be seen with K2 comments not rendering currently. Ref: Screenshot. Kindly confirm if it is fine now
loukasgr Hi again. My idea was to remove all the code between:
<div class="itemComments">
...
</div>
but You will still need to have K2 comments activated in settings. Facebook comments are attached to this layer so it is neccessary to show this layer, but code of k2 comments can be deleted so it will not render k2 commenrts.