xoops forums

metin

Just popping in
Posted on: 2005/10/2 16:17
metin
metin (Show more)
Just popping in
Posts: 64
Since: 2003/6/21
#1

Adding Groups & PDdownloads Comments Infos to UserProfile ?

we are using 2.0.13 ( 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 
"<td align='center' class = 'even'>"._UPTUYES."</td>";
        }
        else {
        echo 
"<td align='center' class = 'even'><b>"._UPTUNO."</b></td>";
        }


I want to add PDdownloads Comments & Which Group member the user is Infos to the userprofile of every member.

What would you say ?

JMorris

XOOPS is my life!
Posted on: 2005/10/2 16:21
JMorris
JMorris (Show more)
XOOPS is my life!
Posts: 2722
Since: 2004/4/11
#2

Re: Adding Groups & PDdownloads Comments Infos to UserProfile ?

Please do not click the submit button more than once. I've deleted your duplicate thread.

Best Regards,

James
Insanity can be defined as "doing the same thing over and over and expecting different results."

Stupidity is not a crime. Therefore, you are free to go.