Kunena 7.1.1 & Kunena 6.4.17 – Security Updates Released

The Kunena team has announce the arrival of Kunena 7.1.1 [K 7.1.1] in stable which is now available for download as a native Joomla extension for J! 5.4.x/6.0.x./6.1.x./6.2.x This version addresses most of the issues that were discovered in K 6.2 / K 6.3 / K 6.4 / K7.0 and issues discovered during the last development stages of K 7.1
Just a reminder: K6.4.17 receives only securities fixes until end of 2026, so it's advised for users to upgrade to K7.1.

This category contains miscellaneous, uncategorised user contributions, (templates, modules, plugins and hacks) relating to older versions of Kunena that are no longer supported.

The topics in this category are for historical interest only. Owing to the structural changes that occurred in K 2.0, many of the ideas in these topics will not work with later versions and, for that reason, the topics are locked.

Solved Last Post text length

More
14 years 2 months ago - 14 years 2 months ago #133797 by nov33
Last Post text length was created by nov33
Hello all,

I would like to ask if anyone knows where the file is located that changes the length of the "last post" text on the category index.

The link to the last post in the right hand side column. eg...

Last Post: example text length

I recently went from an older version to 2.0

With the olderversion I knew the file was here: /components/com_kunena/template/default/categories/categories.php

and I would change the number in the bolded part of the code in <div class="klatest-subject ks">

<?php echo CKunenaLink::GetThreadPageLink ('view', intval($category->catid), intval($category->thread), intval($category->page), intval($this->config->messages_per_page),
KunenaParser::parseText($category->subject, 30), intval($category->id_last_msg) );?>

I have tried searching for the location of the file for 2.0 and havent found it yet.

regards.
Last edit: 14 years 2 months ago by nov33.

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

More
14 years 2 months ago #133832 by sozzled
Replied by sozzled on topic Last Post text length
It looks to me like the text (the subject of the last post message) is truncated at 20 characters. The value appears to be hard-coded. I looked around and this is what I discovered. If you look at around lines 141-150 of ../components/com_kunena/template/views/category/view.html.php you will find this:
Code:
function getLastPostLink($category, $content = null, $title = null, $class = null) { $lastTopic = $category->getLastTopic(); $channels = $category->getChannels(); if (!isset($channels[$lastTopic->category_id])) $category = $lastTopic->getCategory(); $uri = $lastTopic->getUri($category, 'last'); if (!$content) $content = KunenaHtmlParser::parseText($category->getLastTopic()->subject, 20); if ($title === null) $title = JText::sprintf('COM_KUNENA_TOPIC_LAST_LINK_TITLE', $this->escape($category->getLastTopic()->subject)); return JHTML::_('kunenaforum.link', $uri, $content, $title, $class, 'nofollow'); }
Try changing the line that where you see "getLastTopic()->subject, 20)" to something else. I haven't tested it so I don't know if this is what is responsible for the text truncation. Let us know how you get on.
The following user(s) said Thank You: nov33

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

More
14 years 2 months ago - 14 years 2 months ago #133845 by nov33
Replied by nov33 on topic Last Post text length

sozzled wrote: Try changing the line that where you see "getLastTopic()->subject, 20)" to something else. I haven't tested it so I don't know if this is what is responsible for the text truncation. Let us know how you get on.


That is the one! I just tested it.

Thank you, much appreciated. B)
Last edit: 14 years 2 months ago by nov33.

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

Time to create page: 0.111 seconds