×
Kunena 5.2 Beta 1 Released (24 Sep 2020)

The Kunena team is thrilled to announce the first public beta release of Kunena 5.2, a native Joomla extension for Joomla 3.9. This is a development release and should be only be used for testing; this version is not recommended for live websites at this stage.

The purpose of this release is to encourage testing by downloading, installing and identifying any problems or shortcomings that people may discover. K 5.2.0 B1 is stable and we are aware that people will discover defects. We encourage you to use the forum to report defects, as soon as they are discovered, so that the development team can work through the problems before the release of K 5.1 as a stable product. Reporting defects does not mean that the problems can or will be fixed. The Kunena team is looking forward to hearing your feedback on how well we have achieved our design goals.

× 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
8 years 9 months ago - 8 years 9 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: 8 years 9 months ago by janaf.

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

More
8 years 9 months ago - 8 years 9 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: 8 years 9 months ago by janaf.

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

More
8 years 9 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
8 years 8 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.091 seconds