Kunena 6.2.5 & module Kunena Latest 6.0.7 released

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

Solved Crypsis - Font Awesome for Topic Icons

More
8 years 9 months ago #1 by joomfx
Hi guys,

Sorry if I'm posting this in the wrong category, it is not a bug, it is a question so feel free to move it in the appropriate category.

I'm really struggling with the Topic Icons, tried many different things but I'm stuck.
I do realize it is a customization requests that should be done on our own but I would really want to ask you for some basic instructions as I'm kind of lost at the moment.

I'm on Kunena/Crypsis 4.0.2 and as mentioned above I'm trying to customize the template so it uses FontAwesome icons instead of the default Topic Icons PNG files.

As far as I understand the particular icon is being loaded depending on the entries in the "topicicons.xml" file. But here comes the first issue:

1. If I set the "Selectable Topic Icons" option to YES and if I rename the "topicicons.xml" file (media/kunena/topic_icons/default) the icons are not loaded, as they are supposed to. So far so good. But...

2. If I set the "Selectable Topic Icons" option to NO (as I need it be) and if I rename the "topicicons.xml" file in "media/kunena/topic_icons/default" and the "topicicons.xml" file in "media/kunena/topic_icons/system" the icons are still being loaded, while they shouldn't. Where does Kunena take the information about what icon should be loaded in this case?

Probably the above issue is related to this "defect" - github.com/Kunena/Kunena-Forum/issues/3193 . Would you please let me know if you will change this behavior as it does not make much sense that it will only work if "Selectable Topic Icons" option is set to YES?

And now comes the actual question this topic is about...

The code that loads the Topic Icons (in Category View) is located in the category.php file (/components/com_kunena/template/crypsis/layouts/topic/row) on line 39:

<?php echo $this->getTopicLink($topic, 'unread', $topic->getIcon($topic->getCategory()->iconset)); ?>

And this code renders the following HTML in the Frontend:

<img alt="emo" src="/test/media/kunena/topic_icons/system/normal.png">

In the above HTML the "src" is being taken (or at least this is how I think) from the "topicicons.xml" file.

So what I need is to have the following code being rendered on the Frontend:

<i class="icon-name"></i>

Where the class (icon-name) is being loaded depending on the entries in the "topicicons.xml" file.

So, which file should I modify in order to change the <img> tag with <i> tag?

The guys at Rockettheme have done the same thing with their community forum.

@810 - mate, I do understand that this is not a normal support question, so please let me know if we should take this conversation to another place. I would be happy to pay for your time to explain how the above can be done.

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

More
8 years 9 months ago #2 by sozzled
Very similar problems to another discussion: see Crypsis - Font Awesome for Topic Icons

As far as I know, topic icons in K 4.0 (Crypsis and Blue Eagle) are not glyph-based; they are images—i.e separate files in one of the supported image formats). It's theoreticallypossible to render an icon as a glyph with CSS but I haven't spent more than 10 seconds thinking about it.

How do you think you might go about creating a CSS rule to change an image into something with
Code:
font-family: "Font Awesome"

I think you're right: it's not a bug. It's a request for a hack. There's a "hacker's corner" around this forum somewhere.

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

More
8 years 9 months ago #3 by joomfx
Thank you for your input sozzled.

Yes, it is definitely not a bug (apart from the "Selectable Topic Icons" thing).

Basically, everything is explained in my first post. I'm planning to add a different icon (different class) depending on the Topic Status (Normal, Unanswered, Sticky, Locked...).

Just have a look at the Rockettheme Forum and you will see what I mean.

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

More
8 years 9 months ago #4 by 810
Topic icons should be icons, not css. That's why it doesn't work.

On category icons have only support for Font Awesome.

I want to add it to the next big release (Q3/Q4 2015)

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

More
8 years 6 months ago #5 by 810
will be in next version.

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

Time to create page: 0.391 seconds