×
Kunena 5.2.6 released and Blue eagle 1.6.6 released (25 Jul 2021)

The Kunena team has announce the arrival of Kunena 5.2.6 [K 5.2.6] which is now available for download as a native Joomla extension for J! 3.9.x. This version addresses most of the issues that were discovered in K 5.2 and issues discovered during the development stages of K 5.2.6

× This category is for the module developed, endorsed, maintained and supported by the Kunena project team. The topics in this category only relate to the module developed for K 1.6 and later versions.

Question [Solved] Adding ... after Post Text Limit

More
9 years 7 months ago - 9 years 7 months ago #1 by janaf
I have Post Text and a Post Text Limit set with Kunena Latest and the text truncates right at that number of chars.

Is there something like "....." that I can enable? Or can someone guide me on how to add this at the end of the text string?

Thanks
Last edit: 9 years 7 months ago by janaf.

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

More
9 years 7 months ago - 9 years 7 months ago #2 by janaf
Found the code:
<?php if ($this->params->get ( 'sh_firstcontentcharacter' )) : ?>
			<li class="klatest-preview-content"><?php echo JString::substr(KunenaParser::stripBBCode($item->message), '0', $this->params->get ( 'lengthcontentcharacters' )); ?></li>
		<?php endif; ?>

As my knowledge of php is minimal, I'd need some help with the syntax for this:
<?php if ($this->params->get ( 'sh_firstcontentcharacter' )) : ?>
			<li class="klatest-preview-content"><?php echo JString::substr(KunenaParser::stripBBCode($item->message), '0', $this->params->get ( 'lengthcontentcharacters' )); ?>
 
// Add as pseudocode "IF length of BBstripped message > lengthcontentcharacters then output '...' "
 
</li>
<?php endif; ?>

Could someone help with this?
Last edit: 9 years 7 months ago by janaf.

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

More
9 years 7 months ago #3 by janaf
Finally figured it out B)
<?php if ($this->params->get ( 'sh_firstcontentcharacter' )) : ?>
	<li class="klatest-preview-content"><?php echo JString::substr(KunenaParser::stripBBCode($item->message), '0', $this->params->get ( 'lengthcontentcharacters' )); ?>
	<?php if (strlen(KunenaParser::stripBBCode($item->message)) > $this->params->get ( 'lengthcontentcharacters' )) 
		{
			echo "...";
		}
?>
	</li>
<?php endif; ?>

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

More
9 years 6 months ago #4 by djvexo
Hello,
i tried to make a code for add "..." after the Subject Text Limit but it doesn't work.
Someone can say me how i can make this.

Regards

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

  • Not Allowed: to create new topic.
  • Not Allowed: to reply.
  • Not Allowed: to edit your message.
Time to create page: 0.068 seconds