Keyword

Comments folded out

  • Zebra Film
  • Zebra Film's Avatar Topic Author
  • Offline
  • New Member
More
11 years 8 months ago #109287 by Zebra Film
Comments folded out was created by Zebra Film
When someone opens an item, it shows the item with the comments folded out but when I use the latest comment on the frontpage it only shows a link.

How can I change this?

The code in the latest_item.php
	<!-- Anchor link to comments below -->
	<div class="latestItemCommentsLink">
		<?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; ?>

But I can't simply replace it with the code in the item.php seems. My PHP knowledge is limited so some hints would be nice.

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


Powered by Kunena Forum