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

This category for technical discussions among experienced, skilled developers who either want to integrate own their software with Kunena or who are developing new features for Kunena.

Please introduce yourself and your goals before asking the questions.

Please do not ask questions about when new versions of Kunena will be released. They will not be answered here and may result in locking the topic from further discussion.

Question Proposition of new triggers

More
11 years 4 months ago #1 by Obsidev
Hi !

I made a plugin for Kunena in order to add "ticket features".
During the development of the plugin, I had to include two new triggers.

The idea of the plugin is to add a new topic listing for "moderators".
All opened threads should be list in this new tab so we need to customized the database query (more than "order" and "where").

So, I added a trigger "onKunenaGetTopics" which is called when the list.mode is "plugin" (a new type for plugins that I had to add in a xml file).
With this trigger, plugins could return variables $total and $topics. If nothing return, the default mode is used ("my topics").

The other trigger allows to add new buttons.
Next to "reply", "moderate" or other buttons, we wanted to add extra buttons for the moderation (in order to open or close "tickets").
Thanks to this trigger, we added a special "ban" button which automatically ban the user and delete his messages.

So my main question is : does this triggers could interest you ?
I could create a fork and make a pull request with these new triggers (in a clean code).

Regards,
Jerome / HikaShop team

HikaMarket / HikaSerial / HikaShop tools developper.
Jerome @ HikaShop team - eCommerce solutions for Joomla.
The following user(s) said Thank You: ssnobben

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

More
11 years 4 months ago #2 by 810
Replied by 810 on topic Proposition of new triggers
Hi,
Is it a plugin, or a feature?

You can create a branch. and poste here the url.


Regards 810

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

More
11 years 4 months ago #3 by xillibit

The other trigger allows to add new buttons.
Next to "reply", "moderate" or other buttons, we wanted to add extra buttons for the moderation (in order to open or close "tickets").
Thanks to this trigger, we added a special "ban" button which automatically ban the user and delete his messages.

Hello,

Some users have requested to have this feature, so it could intersting to have it into Kunena.

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.

More
11 years 4 months ago #4 by Obsidev
Replied by Obsidev on topic Proposition of new triggers
Hi,

I have made two pull requests for the two triggers.

onKunenaGetButtons
Code:
onKunenaGetButtons($type, &$buttons, $view)
Allows to add new buttons for topic ($type == 'topic.action') and messages ($type == 'message.action').

Here an example of our "ban" button. (It use a specific controller for our checks etc)
Code:
$token = (version_compare(JVERSION,'3.0','>=') ? JSession::getFormToken() : JUtility::getToken()); if($type == 'message.action') { $deleteBtns = $buttons->get('delete'); $task = 'index.php?option=com_kunena&view=topicmoderate&task=%s&catid='.$catid.'&id='.$id.'&msgid='.$view->message->id.'&userid='.$view->message->userid.'&' . $token . '=1'; if(!in_array($view->message->userid, $this->moderators)) $deleteBtns .= ' ' . $view->getButton(sprintf($task, 'ban'), 'ban', 'topic', 'moderation'); $buttons->set('delete', $deleteBtns); }

onKunenaGetTopics
Code:
onKunenaGetTopics($layout, $mode, &$topics, &$total, $model)
Allows to create new topic listing.
The function has to check the $mode content and could filed $topics and $total variables.

Thanks to theses triggers, we create a "ticket" system with topic assignation and priorities.
Our new forum listing "moderation" list open thread and a specific ordering.
Thanks to buttons, we can change the priority of a thread, close it if new answer needed, change the affectation to another moderator, etc.

Our plugin contains an Activity class too. The activity open thread when a user post a message and close a thread when it is a moderator.

Hope these triggers would interest you and could help other people.

Regards,
Jerome

HikaMarket / HikaSerial / HikaShop tools developper.
Jerome @ HikaShop team - eCommerce solutions for Joomla.

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

More
11 years 4 months ago #5 by Jiminimonka
Have you made a fork on GitHub for this Obsidev?

Please read the FAQ.
Only one question per topic.
Search before you ask a question.

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

More
11 years 4 months ago #6 by Obsidev
Replied by Obsidev on topic Proposition of new triggers
Yep,

I made a fork with two branches and two pull requests.
github.com/obsidev/Kunena-2.0

github.com/Kunena/Kunena-2.0/pulls/obsidev

Pull requests were pending during the JWC.
Hope that they would be accepted for 2.0.4 !

Regards,

HikaMarket / HikaSerial / HikaShop tools developper.
Jerome @ HikaShop team - eCommerce solutions for Joomla.
The following user(s) said Thank You: ssnobben, Jiminimonka

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

Time to create page: 0.444 seconds