Comments still do not work - need to finally fix it!

Rate this topic: Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.1.00 out of 6 based on 1 vote(s)
GK User
Fri Oct 10, 2014 5:30 pm
Reply with quote
Report this post
Hi guys, we did try to fix it with Startup and comments before. But never got it done. And I do need comments on this site and I do need it to work for both Jcomments and three of the Social networks (arrows 1-3). Since the site is in Russian, I turned English on and made couple of screenshots to point out what exactly is wrong. There are two things: When template is on, Captcha picture doesn't come through, and comments tabs do not work.

Here's how the page looks when I turn off Startup template: https://yadi.sk/i/oM0ZAffEbvanj
Arrows 1 through 3 are tabs on the comments module, number 4 is the only one we get when template is on (Without a tab though): https://yadi.sk/i/GBLUEW_Ybvb6n

Here are the pages I've put up for you to check it out and play around if needed: http://fitness7vetrov.ru/gavick-template and http://fitness7vetrov.ru/gavick-no-template though it will be in Russian now.

I do need it to work, please.
User avatar
Platinum Boarder

teitbite
Sun Oct 12, 2014 3:37 pm
Reply with quote
Report this post
Hi

Have You noticed that those are 2 totally different comment systems ? Please send me an access to joomla panel and ftp of this site. I'll try to figure out which plugin position jcomments are using.
User avatar
Moderator

GK User
Sun Oct 12, 2014 8:51 pm
Reply with quote
Report this post
teitbite wrote:Hi

Have You noticed that those are 2 totally different comment systems? Please send me an access to joomla panel and ftp of this site. I'll try to figure out which plugin position jcomments are using.


Yes I did. The JoomLine comments PRO v 3.0 should be replacing Jcomments, but in template it doesn't happen for some reason... Sent you all info via PM.
User avatar
Platinum Boarder

teitbite
Mon Oct 13, 2014 2:37 pm
Reply with quote
Report this post
Hi

Please edit file /html/com_k2/templates/item.php find this code:

Code: Select all
                           <?php if($this->item->numOfComments>0 && $params->get('itemComments') && !JRequest::getInt('print') && ($params->get('comments') == '1' || ($params->get('comments') == '2'))): ?>
                           <h3 class="titleComments"> <?php echo $this->item->numOfComments; ?> <?php echo ($this->item->numOfComments>1) ? JText::_('K2_COMMENTS') : JText::_('K2_COMMENT'); ?> </h3>
                           <?php if($params->get('itemComments') && ( ($params->get('comments') == '2' && !$this->user->guest) || ($params->get('comments') == '1'))):?>
                           <?php echo $this->item->event->K2CommentsBlock; ?>
                           <?php endif;?>
                           <?php if($params->get('itemComments') && !JRequest::getInt('print') && ($params->get('comments') == '1' || ($params->get('comments') == '2')) && empty($this->item->event->K2CommentsBlock)):?>
                           <div class="itemComments" id="itemCommentsAnchor">
                                    <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'; ?>">
                                                      <?php if($comment->userImage):?>
                                                      <img src="<?php echo $comment->userImage; ?>" alt="<?php echo JFilterOutput::cleanText($comment->userName); ?>" width="<?php echo $params->get('commenterImgWidth'); ?>" />
                                                      <?php endif; ?>
                                                      <?php if(!empty($comment->userLink)): ?>
                                                      <h3> <a href="<?php echo JFilterOutput::cleanText($comment->userLink); ?>" title="<?php echo JFilterOutput::cleanText($comment->userName); ?>" target="_blank" rel="nofollow"> <?php echo $comment->userName; ?> </a></h3>
                                                      <?php else: ?>
                                                      <h3> <?php echo $comment->userName; ?> </h3>
                                                      <?php endif; ?>
                                                      <a class="commentLink" 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 echo JHTML::_('date', $comment->commentDate, JText::_('DATE_FORMAT_LC2')); ?> </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 class="commentReportLink modal" rel="{handler:'iframe',size:{x:640,y:480}}" href="<?php echo JRoute::_('index.php?option=com_k2&view=comments&task=report&commentID='.$comment->id)?>"><?php echo JText::_('K2_REPORT')?></a>
                                                      <?php endif; ?>
                                                      </span>
                                                      <?php endif; ?>
                                             </li>
                                             <?php endforeach; ?>
                                    </ul>
                                    <div class="pagination">
                                             <?php echo $this->pagination->getPagesLinks(); ?>
                                    </div>
                           </div>
                           <?php endif; ?>
                           <?php endif; ?>
                           <h3 class="titleComments"> <?php echo JText::_('K2_LEAVE_A_COMMENT') ?> </h3>
                           <?php if($params->get('commentsFormPosition')=='below' && $params->get('itemComments') && !JRequest::getInt('print') && ($params->get('comments') == '1' || ($params->get('comments') == '2' && K2HelperPermissions::canAddComment($this->item->catid)))): ?>
                           <div class="itemCommentsForm">
                                    <?php echo $this->loadTemplate('comments_form'); ?>
                           </div>
                           <?php endif; ?>
                           <?php $user = &JFactory::getUser(); if ($params->get('comments') == '2' && $user->guest):?>
                           <div>
                                    <?php echo JText::_('K2_LOGIN_TO_POST_COMMENTS');?>
                           </div>
                           <?php endif; ?>


and replace it with:

Code: Select all
  <?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; ?>
User avatar
Moderator

GK User
Tue Oct 14, 2014 9:04 am
Reply with quote
Report this post
teitbite wrote:Hi

replace it with:


Thank you for fixing it! Perfect! Though the patch sdoesn't work on the other template for some reason... Seems like it differs from template to template...
User avatar
Platinum Boarder

teitbite
Wed Oct 15, 2014 10:40 am
Reply with quote
Report this post
Hi

This should work everywhere. I'm basically removing out comments code and replacing with the code loading a plugin position Your comments are using. So there is no much possibilities to make it wrong.
User avatar
Moderator


cron