Kunena 7.0.2 Released

The Kunena team has announce the arrival of Kunena 7.0.2 [K 7.0.2] in stable which is now available for download as a native Joomla extension for J! 5.3.x/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

Topics that are moved into this category are generally considered to be closed. Users may want to add additional information but these topics should not be resurrected in order to discuss new problems or unrelated matters.

Merged How to create category and sub-category icons in K 3.0

More
12 years 9 months ago - 12 years 9 months ago #145260 by sozzled
nickb wrote:

I want [to use] ../media/kunena/category_images/19_notlogin.png

You cannot use this in K 3.0.

If you read footnote #2 of Category icons you will see that the "feature" that displayed a different category icon when users are not logged-in to your forum (which was done by having a file called <cat_id>_notlogin.gif uploaded to the folder ../media/kunena/category_images), this feature was removed in K 2.0.

Therefore, the question of whether you can use a .PNG file instead of a .GIF file for this third [not logged-in] state is irrelevant.

In terms of the general question about using .PNG files instead of .GIF files for custom category icons, the information given in the Wiki article (and which I reproduced, in part, in my reply in msg #4 of this topic) is out of date and incorrect.

In a future version of Kunena we would like to allow users to upload either .PNG or .GIF files. Obviously, though, if you had two files, for example
  • 19_on.gif
  • 19_off.png
only one of these files would actually be used.

As a temporary workaround, a simple way to use .PNG files instead of .GIF files is to look at the code in the file ../components/com_kunena/views/category/view.html.php between lines 156 and 164. The original source code is this:
Code:
// Check Unread Cat Images if (is_file ( JPATH_ROOT."/media/kunena/{$this->config->catimagepath}/{$category->id}_on.gif" )) { return "<img src=\"" . JUri::root(true) . "/media/kunena/{$this->config->catimagepath}/{$category->id}_on.gif\" border=\"0\" class='kforum-cat-image' alt=\" \" />"; } else { return $this->getIcon ( $this->ktemplate->categoryIcons[1], JText::_ ( 'COM_KUNENA_GEN_FORUM_NEWPOST' ) ); } } else { // Check Read Cat Images if (is_file ( JPATH_ROOT."/media/kunena/{$this->config->catimagepath}/{$category->id}_off.gif" )) { return "<img src=\"" . JUri::root(true) . "/media/kunena/{$this->config->catimagepath}/{$category->id}_off.gif\" border=\"0\" class='kforum-cat-image' alt=\" \" />";
You could simply change the ".gif" references to ".png" instead. However, here's another solution that may do the job easier for you:

===========This is untested and may result in your forum not functioning properly===========

(1) Download the attached file

File Attachment:

File Name: view.html.zip
File Size:4.86 KB


(2) Extract the file view.html.php to your personal hard drive.

(3) Using your favourite FTP program, rename the file ../components/com_kunena/views/category/view.html.php as ../components/com_kunena/views/category/view.html.old

(4) Using your favourite FTP program, copy the file you extracted in step (2) above to the folder ../components/com_kunena/views/category/

(5) This change will allow you to use any one (but only one) of the similarly named files:
  • .GIF
  • .PNG
  • .JPG
In other words, if you have three files called 19_on.gif, 19_on.png and 19.jpg, the .GIF one will be used.

I hope this helps.

(Thanks to LittleJohn for providing me with the solution)
Last edit: 12 years 9 months ago by sozzled.
The following user(s) said Thank You: nickb

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

More
12 years 9 months ago #145273 by nickb
ok i will try it... i just wanna use only png because i dont like the Q of gif convert.

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

More
12 years 8 months ago #146210 by robinwave
This is nice. I will try it with my website too.

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

More
12 years 6 months ago - 12 years 6 months ago #148148 by YonisHobby
Hi,

I'm using the latest version of Kunena installed on the latest version of Joomla.
I would like to have a different icon for every category. The solution I found is for early Kunena versions.
How do I implement it on the latest?

Many thanks!

Edit:
Placed it here by mistake. The solution found here:
Found the solution here:
www.kunena.org/docs/Category_icons

And this is my forum . :)
Last edit: 12 years 6 months ago by YonisHobby.

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

More
12 years 6 months ago #148151 by sozzled
*** Topics merged ***

You will find the answer to your question in this topic.

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

More
12 years 6 months ago #148209 by Ancientwolf
Read the "Change category icons". That changes all of them to an individual image, not what I'm looking for.

Already looked at the post in the 1.7 forums other have referred to before- it works on K2.0, but not 3.

www.kunena.org/forum/170-K-17-Templates-...ategory-icons#101195

Any way to do this once again? I'm surprised this still hasn't made it into the default setup.

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

Time to create page: 0.272 seconds