- Posts: 14
- Thank you received: 1
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.
The topics in this category are for historical interest only. Owing to the structural changes that occurred in K 1.7, many of the ideas in these topics will not work with later versions and, for that reason, the topics are locked.
Question How Write code : $user_origine_id= "USER ID of MESSAGE SOURCE"
I started on the API Kunena and Joomla
How to write this code.
$id_user_of_post = 'The ID of the user of the message spirit moderate')
I want to remove points AlphaUserPoints to the "ID of Origin POST" (the user origni) when the moderator delete a message in the forum
I write this, but is dont' work ::
$user_origine_id = $this-> get ('user ID off thread')
Can you corrige me ????!
Very thinks for your good help !!!
1°) You need ot check if the user which is removing the message is a moderator, there is a function in Kunena to check if an user is a moderator
2°) Then, you can remove points to the user in AUP
I don't provide support by PM, because this can be useful for someone else.
I know the fonction to test if modérator :
<?php if (CKunenaTools::isModerator($this->my->id)) : ?>
but I don't know this fonction in PHP :
$user_origine_id = "USER ID of MESSAGE"
Can you help me ?
Is possible whith this :
$user_post_origine_id = KunenaFactory::getPOST ($userid);
Can you indicate the good formule ?