Keyword

Comment message link at the bottom of the article

  • sesami
  • sesami's Avatar Topic Author
  • Offline
  • New Member
More
8 years 8 months ago #150443 by sesami
Dear Support;

I'm really new for K2. I have been trying to customize a bit and have actually been struggling.. I would be happy if you can help me out.

Now, "read more" button is hide. But I want to add "comment link message". I can see this message after clicking read more button.
I would like to complete the whole article without "read more". Which file or parameter should I use for this changes?

imgur.com/y7LOSPQ

Please Log in or Create an account to join the conversation.

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
8 years 8 months ago #150473 by Krikor Boghossian
Replied by Krikor Boghossian on topic Comment message link at the bottom of the article
If you enable both the fulltext and the introtext in the category's settings then the entire post will appear.

As for the comments link, if the comment count is enabled, again through the category's settings a link and a counter towards the comment section will appear.

You can override the category_item.php file - getk2.org/documentation/tutorials/174-templating-with-k2-and-the-concepts-of-sub-templates - and move the comments counter to the end of the file.

The end result of the comment counter should look like this.
    <?php if($this->item->params->get('catItemCommentsAnchor') && ( ($this->item->params->get('comments') == '2' && !$this->user->guest) || ($this->item->params->get('comments') == '1')) ): ?>
    <!-- Anchor link to comments below -->
    <div class="liItemCommentsLink catItemCommentsLink">
      <i class="icon-comments"></i>
      <?php if(!empty($this->item->event->K2CommentsCounter)): ?>
        <!-- K2 Plugins: K2CommentsCounter -->
        <?php echo $this->item->event->K2CommentsCounter; ?>
      <?php else: ?>
        <?php if($this->item->numOfComments > 0): ?>
        <a href="<?php echo $this->item->link; ?>#itemCommentsAnchor">
          <?php echo $this->item->numOfComments; ?> <?php echo ($this->item->numOfComments>1) ? JText::_('K2_COMMENTS') : JText::_('K2_COMMENT'); ?>
        </a>
        <?php else: ?>
        <a href="<?php echo $this->item->link; ?>#itemCommentsAnchor">
          <?php echo JText::_('K2_BE_THE_FIRST_TO_COMMENT'); ?>
        </a>
        <?php endif; ?>
      <?php endif; ?>
    </div>
    <?php endif; ?>

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

  • sesami
  • sesami's Avatar Topic Author
  • Offline
  • New Member
More
8 years 8 months ago #150507 by sesami
Hello,

Thank you for your support. I will try to do this.

Regards,

Please Log in or Create an account to join the conversation.

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
8 years 8 months ago #150520 by Krikor Boghossian
Replied by Krikor Boghossian on topic Comment message link at the bottom of the article
You 're welcome Sesami.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum