- Posts: 14
- Thank you received: 1
Kunena 6.1.3.2 Released
The Kunena team has announce the arrival of Kunena 6.1.3.2 [K 6.1.3] which is now available for download as a native Joomla extension for J! 4.2.x/4.3.x. This version addresses most of the issues that were discovered in K 6.1.0 and issues discovered during the last development stages of K 6.1
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.
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"
11 years 8 months ago - 11 years 8 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 !!!
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: 11 years 8 months ago by JSMario.
Please Log in or Create an account to join the conversation.
11 years 8 months ago #2
by xillibit
I don't provide support by PM, because this can be useful for someone else.
Replied by xillibit on topic Re: Write code : ( $user_origine_id= "USER ID of MESSAGE" )
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
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.
11 years 8 months ago #3
by JSMario
Replied by JSMario on topic Re: How Write code : ( $user_origine_id= "USER ID of MESSAGE" )
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 ?
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.
11 years 8 months ago - 11 years 8 months ago #4
by C0n
Replied by C0n on topic Re: How Write code : ( $user_origine_id= "USER ID of MESSAGE" )
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: 11 years 8 months ago by C0n.
Please Log in or Create an account to join the conversation.
11 years 8 months ago #5
by JSMario
Replied by JSMario on topic Re: How Write code : ( $user_origine_id= "USER ID of MESSAGE" )
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 ?
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.
11 years 8 months ago #6
by JSMario
Replied by JSMario on topic Re: How Write code : ( $user_origine_id= "USER ID of MESSAGE" )
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.294 seconds