Kunena 7.0.4 Released

The Kunena team has announce the arrival of Kunena 7.0.4 [K 7.0.4] in stable which is now available for download as a native Joomla extension for J! 5.4.x/6.0.x. This version addresses most of the issues that were discovered in K 6.2 / K 6.3 / K 6.4 and issues discovered during the last development stages of K 7.0

Topics that are moved into this category are generally considered to be closed. Users may want to add additional information but these topics should not be resurrected in order to discuss new problems or unrelated matters.

Question How do I retrieve post count from database?

More
15 years 7 months ago - 15 years 7 months ago #62561 by mstephan
Hi, I'm currently using JomSocial and I'm trying to put post count on my user's JomSocial profiles.

I found a thread on this forum that gave me the following code to do so.
Code:
<?php require_once JPATH_ROOT.DS."administrator".DS."components".DS."com_kunena".DS."api.php"; $posts = KunenaUserAPI::getPosts($userid); echo $posts->total; ?>

However when I put it into my document, I get an error message saying
Code:
JUser::_load: User does not exist
How can I access my database? Is it unable to find it because my database has a different name? I'm a noob to PHP and any insight would help a lot.
Last edit: 15 years 7 months ago by mstephan.

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

More
15 years 7 months ago #62748 by xillibit
Hello,

In which page do you have put this aprt of code ?
Are-you that the variable $userid isn't empty ?

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.

Time to create page: 0.271 seconds