Kunena 6.0.8 Released (17 Jan 2023)

The Kunena team has announce the arrival of Kunena 6.0.8 [K 6.0.8] which is now available for download as a native Joomla extension for J! 4.2.x. This version addresses most of the issues that were discovered in K 6.0 and issues discovered during the development stages of K 6.0.

This category is for the plugin developed, endorsed, maintained and supported by the Kunena project team. The topics in this category only relate to the plugin developed for K 3.0 and later versions.

If you are having problems then, for your own benefit, it would save us all a lot of time if you would kindly post your configuration report when you ask for help from this forum. If you do not post your configuration report we will not ask you for it but you will probably not get your problem solved, either.

Question Category mapping - map only by the parent category

9 years 8 months ago - 9 years 8 months ago #1 by gray
When configuring the plugin I found that need to add over 20 "category ID, form ID" pairs into "Category Mapping" field to get it working. But it's only 2 main (parent) categories which have about 10 sub-categories each. So, to make my job easier, I decided to add checks of the parent category into the plugin's code.

Thus, in kunenadiscuss.php instead
if (!empty ( $categoryMap ) && isset ( $categoryMap [$catid] )) { $forumcatid = intval($categoryMap [$catid]); if (!$forumcatid) { $this->debug ( "onPrepareContent.Deny: Category {$catid} was disabled in the category map." ); return false; } $this->debug ( "onPrepareContent.Allow: Category {$catid} is in the category map using Kunena category {$forumcatid}" ); return $forumcatid; }

I put the code from the attached TXT file - I could not publish it here because of server errors.

www.justPHP.net - Custom coding for Joomla!
Last edit: 9 years 8 months ago by gray. Reason: reuploaded attachment
The following user(s) said Thank You: leyeti77

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

9 years 2 months ago #2 by gray
Created pull request for this feature:

www.justPHP.net - Custom coding for Joomla!

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

Time to create page: 0.300 seconds