1
we are using 2.0.13 (
http://www.remixland.de )
Did get help with this code from Mithandir for my userpoints module:
function tabComments($uids) {
global $xoopsDB, $periodej;
$module_handler = xoops_gethandler("module");
$pdmodule = $module_handler->getByDirname("PDdownloads");
$sql = "SELECT COUNT(*) FROM ".$xoopsDB->prefix("xoopscomments")." WHERE com_uid='$uids' AND com_created > '$periodej'";
if (is_object($pdmodule)) {
$sql .= " AND com_modid=".$pdmodule->getVar('mid');
}
list($comb) = $xoopsDB->fetchRow($xoopsDB->query($sql));
$abacus = $comb;
return $abacus;
}
and did add add later this code in index.php at line 142( userpoints ) to see if the user is member of an special group or not:
$member_handler =& xoops_gethandler('member');
$member =& $member_handler->getUser($uid);
if (is_object($member)) {
$cur_groups = $member->getGroups();
}
if ($xoopsUser->isAdmin(0)) {
if (in_array(8, $cur_groups)) {
echo ""._UPTUYES." | ";
}
else {
echo ""._UPTUNO." | ";
}
I want to add PDdownloads Comments & Which Group member the user is Infos to the userprofile of every member.
What would you say ?