Kunena 7.1.1 & Kunena 6.4.17 – Security Updates Released

The Kunena team has announce the arrival of Kunena 7.1.1 [K 7.1.1] in stable which is now available for download as a native Joomla extension for J! 5.4.x/6.0.x./6.1.x./6.2.x This version addresses most of the issues that were discovered in K 6.2 / K 6.3 / K 6.4 / K7.0 and issues discovered during the last development stages of K 7.1
Just a reminder: K6.4.17 receives only securities fixes until end of 2026, so it's advised for users to upgrade to K7.1.

Question how to request user posts?

More
17 years 8 months ago - 17 years 8 months ago #7367 by NLkaiser
What files do you need to include and what variable do you need to use to request how mutch user posts the user has? tnx

( I would like to show kunena posts on the jomsocial profile)
Last edit: 17 years 8 months ago by NLkaiser.

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

More
17 years 8 months ago - 17 years 8 months ago #7398 by NLkaiser
Can some1 thell me what I am doing wrong?
Code:
$db->setQuery("SELECT posts FROM #__fb_users" . "WHERE userid=" . $user->id);

or
Code:
$database->setQuery("SELECT posts FROM #__fb_users WHERE userid = '$user'"); $db = $database->loadObjectList();

But that gives a "Call to a member function setQuery() on a non-object in" error
Last edit: 17 years 8 months ago by NLkaiser.

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

More
17 years 8 months ago #7455 by Matias
Add

global $database;

into the beginning of your function.

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

More
17 years 8 months ago - 17 years 8 months ago #7515 by NLkaiser
ok the code now looks like this:
Code:
global $database; // Get CUser object $user = CFactory::getUser( $userid ); $database->setQuery("SELECT posts FROM #__fb_users WHERE userid = '$user'"); $db = $database->loadObjectList();

it gives this error:
Code:
Catchable fatal error: Object of class CUser could not be converted to string in /www/components/com_community/templates/bubble/profile.index.php on line 113

line 113 is:
Code:
$database->setQuery("SELECT posts FROM #__fb_users WHERE userid = '$user'");

is thare a other way to request the user point number of a user?
Last edit: 17 years 8 months ago by NLkaiser.

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

More
17 years 7 months ago #9711 by Matias
That's not the right line.

Look at: /www/components/com_community/templates/bubble/profile.index.php line 113: there you are trying to convert object to a string.

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

More
17 years 7 months ago #9882 by NLkaiser
nvm I olready got it :P

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

Time to create page: 0.119 seconds