- Posts: 1
- Thank you received: 0
Kunena 7.0.4 Released
The Kunena team has announce the arrival of Kunena 7.0.4 [K 7.0.4] in stable which is now available for download as a native Joomla extension for J! 5.4.x/6.0.x. This version addresses most of the issues that were discovered in K 6.2 / K 6.3 / K 6.4 and issues discovered during the last development stages of K 7.0
Question [JomSocial activity stream] text limiter
G
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
We need to be able to set a max lenth, so the text ends with a ".... read more" or something like that.
Also, links needs to be seperate from this, so they don't get cut off
Please Log in or Create an account to join the conversation.
I have a way with a little of hacking, open the file components\com_kunena\template\default\post.php and at line 265 add just this part of code, like you see you can change the number allowed for an new entry for the JS activity stream
I don't provide support by PM, because this can be useful for someone else.
Please Log in or Create an account to join the conversation.
Hello,
I have a way with a little of hacking, open the file components\com_kunena\template\default\post.php and at line 265 add just this part of code, like you see you can change the number allowed for an new entry for the JS activity stream:
Code:$nbrWordMax = '50'; //Define the maximum words allowed in the post $NewString = ''; $t_newString = explode(" ",$message); foreach ($t_newString as $key => $word) { if ($key < $nbrWordMax) { $Newmessage .= $word.' '; } } $message = $Newmessage;
But if I'm not mistaken, this will break links and images that may appear in the post if the word count lands in the middle of a link.
Please Log in or Create an account to join the conversation.
But it's a start
Please Log in or Create an account to join the conversation.