1
metin
Adding Groups & PDdownloads Comments Infos to UserProfile ?
  • 2005/10/2 16:17

  • metin

  • Just popping in

  • Posts: 64

  • Since: 2003/6/21


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 ?

2
JMorris
Re: Adding Groups & PDdownloads Comments Infos to UserProfile ?
  • 2005/10/2 16:21

  • JMorris

  • XOOPS is my life!

  • Posts: 2722

  • Since: 2004/4/11


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.

Login

Username:
Password:

Lost Password? Register now!

Who's Online

72 user(s) are online (49 user(s) are browsing Support Forums)


Members: 0


Guests: 72


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits