Kunena 6.3.0 released

The Kunena team has announce the arrival of Kunena 6.3.0 [K 6.3.0] in stable which is now available for download as a native Joomla extension for J! 4.4.x/5.0.x/5.1.x. This version addresses most of the issues that were discovered in K 6.2 and issues discovered during the last development stages of K 6.3

Question Aurelia stickymsg class bug

2 months 1 week ago - 2 months 1 week ago #1 by TomasFC
I have found that in the latest update of Aurelia, the way the categories are marked with "-stickymsg" class is different on the "Recent Topics" and "My Topics" pages. 
<tbody class="topic-list"> <tr class="category">
When there's a class set for the category (e.g. "-myclass"), in the recent topics, the category class for the row and it's a sticky topic, the class for the tr shows as:
category-myclass (with no "-stickymsg")
in "My Topics" however, it shows as 
category-myclass-stickymsg-stickymsg (with 2 "-stickymsg")

One way to solve this is by modifying the page /components/com_kunena/template/aurelia/layouts/topic/row/default.php around line 33 from
if ($this->topic->ordering) {     $txt = $this->topic->getCategory()->class_sfx ? $txt . '' : $txt . '-stickymsg'; }


if ($this->topic->ordering) {     $txt .= ' ' . 'category-stickymsg'; }

And then duplicating that on  /components/com_kunena/template/aurelia/layouts/topic/row/user.php (change line 64 also) 

This is just one way, as I'm not to decide how to list the classes. In this manner, the classes for the rows show as:
category category-stickymsg 


category-myclass category-stickymsg 

I see there's the class use of "category" or "category-stickymsg" for whether is a sticky class or not. This becomes an issue when adding other classes like "deleted". It would be much simpler to add the sticky class just separately and use "category.stickymsg" in the css rather than "category-stickymsg" so that the order doesn't affect the class. 

Personally, I start my category classes with a space to simplify my css code, but I see the value of having "category-myclass" since it can nullify previous css lines we don't want to use. 

Thank you,
Last edit: 2 months 1 week ago by TomasFC. Reason: clarity

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

3 weeks 6 days ago - 3 weeks 5 days ago #2 by ryan1969
Hello Tomás,

Your proposed solution to modify the PHP files to ensure consistent class naming is a valid approach. Here’s a refined version of your solution, which you can implement:
Modify Default.php:
if ($this->topic->ordering) {
    $txt .= ' ' . 'category-stickymsg';
Similarly, update the user.php file around line 64 with the same code snippet.
In your CSS, you can then target .category-stickymsg separately, which will allow you to add additional classes like deleted without affecting the sticky message styling.  Covered CA
After making these changes, ensure to test both the “Recent Topics” and “My Topics” pages to verify that the classes are applied correctly and that the visual representation is as expected.
Always make a backup of the original files before making changes, so you can revert if needed.

By following these steps, you should be able to achieve a consistent class application across different pages and simplify your CSS code management. Remember to clear your site’s cache after making changes to ensure that the updated files are being used.

I hope my suggestion Is helpful for you. If any queries please tell me I am happy to help you.

Best Regard,
Last edit: 3 weeks 5 days ago by ryan1969. Reason: Edit Best Regard, ryan1969
The following user(s) said Thank You: TomasFC

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

3 weeks 3 days ago #3 by xillibit

The issue is still here with Kunena 6.2.5 ? I'am not able to reproduce it, tjhe sticky topic in recent discussion page have the category-stickymsg class

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.

Time to create page: 0.599 seconds