- Posts: 3
- Thank you received: 0
Kunena 7.0.7 Released
The Kunena team has announce the arrival of Kunena 7.0.7 [K 7.0.7] in stable which is now available for download as a native Joomla extension for J! 5.4.x/6.0.x./6.1.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
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.
It should not be done by hacking kunena core, but only through a plugin, as it would otherwise get deleted on future upgrades of kunena (1.6 being just around the corner)...
But it's a start
Does a URL get interpreted as a single word?
Also, there would be no readmore link in this hack
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Maybe not ideal in the long term, but a decent short term solution until a non-hack text delimiter is available (e.g., if you don't want a page that is a mile long).
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.