Kunena 6.3.3 released

The Kunena team has announce the arrival of Kunena 6.3.3 [K 6.3.3] in stable which is now available for download as a native Joomla extension for J! 4.4.x/5.0.x/5.1.x. This version addresses most of the issues that were discovered in K 6.2 / K 6.3 and issues discovered during the last development stages of K 6.3
Note: Please go to the Kunena Dashboard after an upgrade so that the Kunena database tables are also updated.

This category contains miscellaneous, uncategorised user contributions, (templates, modules, plugins and hacks) relating to older versions of Kunena that are no longer supported.

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"

More
12 years 6 months ago - 12 years 6 months ago #1 by JSMario
Hello

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 !!!
Last edit: 12 years 6 months ago by JSMario.

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

More
12 years 6 months ago #2 by xillibit
Hello,

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.

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

More
12 years 6 months ago #3 by JSMario
Yes off course, I know

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 ?

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

  • C0n
  • C0n's Avatar
  • Offline
  • Premium Member
  • Only the strongest will survive
More
12 years 6 months ago - 12 years 6 months ago #4 by C0n
You mean you are trying to grab the ID of the current post or the userid that created the post ?
Code:
$usr_id = $user->get('id'); $postid = JRequest::getVar('id'); echo $postid; //current id of topic / thread being viewed echo $usr_id; //current user id of logged in member
Last edit: 12 years 6 months ago by C0n.

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

More
12 years 6 months ago #5 by JSMario
Is not OK, don't work in the fonction "public function onAfterDelete($message)"


Is possible whith this :

$user_post_origine_id = KunenaFactory::getPOST ($userid);

Can you indicate the good formule ?

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

More
12 years 6 months ago #6 by JSMario
I need the ID off the user as POST the message

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

Time to create page: 0.483 seconds