- Posts: 41
- Thank you received: 0
Kunena 6.2.6 released
The Kunena team has announce the arrival of Kunena 6.2.6 [K 6.2.6] which is now available for download as a native Joomla extension for J! 4.4.x/5.0.x. This version addresses most of the issues that were discovered in K 6.1 / K 6.2 and issues discovered during the last development stages of K 6.2
Question displaying aupoints in kunena login module
displays avatar
link to pms, profile etc
I would to add the points total of users there to, my php is horrible though, anyone care to help me out?
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
class KunenaProfileAlphaUserPoints extends KunenaProfile {
public function __construct() {
$aup = JPATH_SITE . '/components/com_alphauserpoints/helper.php';
if (! file_exists ( $aup ))
return;
require_once ($aup);
$this->priority = 60;
}
public function getUserListURL($action = '', $xhtml = true) {
$kunena_config = KunenaFactory::getConfig ();
$my = JFactory::getUser();
if ( $kunena_config->userlist_allowed == 1 && $my->id == 0 ) return false;
if (class_exists('AlphaUserPointsHelper') && method_exists ( 'AlphaUserPointsHelper', 'getAupUsersURL' ))
return AlphaUserPointsHelper::getAupUsersURL ();
else {
// For AUP 1.5.3 etc..
static $AUP_itemid = false;
if ($AUP_itemid === false) {
$db = JFactory::getDBO ();
$query = "SELECT id FROM #__menu WHERE `link`='index.php?option=com_alphauserpoints&view=users' AND `type`='component' AND `published`='1'";
$db->setQuery ( $query );
$AUP_itemid = intval ( $db->loadResult () );
}
return JRoute::_ ( 'index.php?option=com_alphauserpoints&view=users&Itemid=' . $AUP_itemid, $xhtml );
}
}
public function getProfileURL($user, $task = '', $xhtml = true) {
if ($user == 0)
return false;
$user = KunenaFactory::getUser ( $user );
$my = JFactory::getUser ();
if ($user === false)
return false;
$userid = $my->id != $user->userid ? '&userid=' . AlphaUserPointsHelper::getAnyUserReferreID ( $user->userid ) : '';
if (class_exists('AlphaUserPointsHelper') && method_exists ( 'AlphaUserPointsHelper', 'getItemidAupProfil' )) {
$AUP_itemid = AlphaUserPointsHelper::getItemidAupProfil ();
} else {
$db = JFactory::getDBO ();
$query = "SELECT id FROM #__menu WHERE link='index.php?option=com_alphauserpoints&view=account' AND type='component' AND published='1'";
$db->setQuery ( $query );
$AUP_itemid = intval ( $db->loadResult () );
}
return JRoute::_ ( 'index.php?option=com_alphauserpoints&view=account' . $userid . '&Itemid=' . $AUP_itemid, $xhtml );
}
public function getProfileView($PopUserCount = 0) {
$_db = &JFactory::getDBO ();
$_config = KunenaFactory::getConfig ();
$queryName = $_config->username ? "username" : "name";
if (! $PopUserCount)
$PopUserCount = $_config->popusercount;
$query = "SELECT a.profileviews AS hits, u.id AS user_id, u.{$queryName} AS user FROM #__alpha_userpoints AS a
INNER JOIN #__users AS u ON u.id = a.userid
WHERE a.profileviews>'0' ORDER BY a.profileviews DESC";
$_db->setQuery ( $query, 0, $PopUserCount );
$topAUPProfileView = $_db->loadObjectList ();
KunenaError::checkDatabaseError ();
return $topAUPProfileView;
}
public function showProfile($userid, &$msg_params) {
}
}
Please Log in or Create an account to join the conversation.
IMHO it returns NULL if integration isn't enabled.
Please Log in or Create an account to join the conversation.
I am a novice web designer and I am doing my homework but obviously I am still a novice so I will have to ask one more question
you are right I added it and it did nothing, it needs to be intergrated, I have been trying for hours but nothing, what I did was take the code from the alphauserpoints module and add it to kunena module but still nothing, can you recognize my mistake?
in class.php I added
in mod_kunenalogin.php I added
and in horizontal.php I added
but I still get nothing
I just realized this is a question I might need to post in aup forums so I'll head over there
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Matias wrote: No, you just need to call this and echo the output:
Code:$points = KunenaFactory::getActivityIntegration()->getUserPoints($this->profile->userid);
IMHO it returns NULL if integration isn't enabled.
How do I override integration code to display points even when integration/plugin is not enabled ?
Please Log in or Create an account to join the conversation.