×
Kunena 5.2.9 released and Kunena 6.0.0 (08 Jun 2022)

The Kunena team has announce the arrival of Kunena 5.2.9 [K 5.2.9] which is now available for download as a native Joomla extension for J! 3.10. This version addresses most of the issues that were discovered in K 5.2 and issues discovered during the development stages of previous version of K5.2.

The Kunena team has announce the arrival of Kunena 6.0.0 [K 6.0.0] which is now available for download as a native Joomla extension for J! 4.1.x. Only the module kunena latest and the discuss plugin which are still in beta are working in Joomla! 4.1 with Kunena 6.0.

× 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.

K 2.0 support will cease on 31 August 2013 and this section of the forum will be closed and archived after that time and no further questions will be answered about this version.

Question User's rank from api

More
8 years 9 months ago - 8 years 9 months ago #1 by DevilDog2098
Currently I'm using Kunena 2.0.4 since my host still hasn't upgraded MySQL so I can update to 3.x. However, I'm using flexi custom code module to pull the users rank and display it on their jomsocial profile page. I've been trying to query the database to pull the information but that's not working. I was wondering if anyone has been able to successfully do this. I can get it to display the username but I haven't been able to find any documentation for the 2.x branch API

Here is what I'm currently doing (this is only my 1st venture into php)
<?php
$userid = JRequest::getInt('userid');
$user = KunenaFactory::getUser($userid);
$test->user = KunenaFactory::getUser($user->id);
$test->rank_image= $test->user->getRank (0, 'image');
$test->rank_title = $test->user->getRank (0, 'title');
echo $test
?>
Last edit: 8 years 9 months ago by DevilDog2098.

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

More
8 years 9 months ago #2 by xillibit
Replied by xillibit on topic User's rank from api
Hello,

In this file : github.com/Kunena/Kunena-Forum/blob/2.0/...raries/user/user.php , you can see a method getRank

Why your code isn't working ? This call : $user = KunenaFactory::getUser($userid); is returning a non-empty object ? After you need to do echo $test->rank_title or echo $test->rank_image

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.

  • Not Allowed: to create new topic.
  • Not Allowed: to reply.
  • Not Allowed: to edit your message.
Time to create page: 0.076 seconds