Author |
Message |
Barkley
New Member


Joined: Mar 12, 2006
Posts: 14
|
Posted:
Mon Mar 13, 2006 8:10 pm |
|
After I did my first install yesterday it always showed me in the Admin group that I had created, even when I wasn't part of it - in the "User Info" block, that is. Today I re-installed everything and now it doesn't show my group assignments in the "User Info" block, it shows them in "Your Account" only. It only shows "Group Memberships:" but nothing underneath. Any ideas?
Oh and btw, RavenNuke76 rocks!  |
|
|
|
 |
CodyG
Life Cycles Becoming CPU Cycles

Joined: Jan 02, 2003
Posts: 714
Location: Vancouver Island
|
Posted:
Tue Mar 14, 2006 8:43 am |
|
Yea... RavenNuke rocks!
Are you looking at all this as admin or as user? |
_________________ "We want to see if life is ubiquitous." D.Goldin |
|
|
 |
Barkley

|
Posted:
Tue Mar 14, 2006 9:02 am |
|
I'm logged in as a regular registered user. This is how my "User Info" block looks like. It doesn't change at all if I am assigned to a group or not.
It should show my group memberships, then a horizontal line, and then the latest registered user underneath that. But my group memberships and the line are missing for some reason. |
|
|
|
 |
CodyG

|
Posted:
Tue Mar 14, 2006 11:04 am |
|
I'm not using the default InfoBlock but I had a look and there is a variable in the sql that calls the user, but $memname isn't defined anywhere. I'll look into it a little further.
Code:
$content .= "<br><u><b>Group Memberships:</b></u><br>\n";
list($uid) = $db->sql_fetchrow($db->sql_query("select user_id from $user_prefix"._users." where username='$memname'"));
|
|
|
|
|
 |
montego
Site Admin

Joined: Aug 29, 2004
Posts: 9457
Location: Arizona
|
Posted:
Thu Mar 16, 2006 7:29 pm |
|
CodyG, I have fixed this in 2.02.02 as well as there were some hard-coded literals. |
_________________ Only registered users can see links on this board! Get registered or login!
Only registered users can see links on this board! Get registered or login! |
|
|
 |
Barkley

|
Posted:
Thu Mar 16, 2006 8:09 pm |
|
I assume 2.02.02 has not been released yet?
Is there a quick fix for this that can be done by hand? |
|
|
|
 |
montego

|
Posted:
Thu Mar 16, 2006 8:18 pm |
|
Sorry about that, I don't see any reason why not. Make your code look like this (or just remove the old NSN Groups code and replace with what I have:
Code:
// NSN Groups Memberships
//$content .= "<br><u><b>Group Memberships:</b></u><br>\n";
//list($uid) = $db->sql_fetchrow($db->sql_query("select user_id from $user_prefix"._users." where username='$memname'"));
//$grpmem = $db->sql_query("SELECT gid, edate FROM ".$prefix."_nsngr_users WHERE uid='$uid' ORDER BY gid");
//while(list($gid, $expire) = $db->sql_fetchrow($grpmem)) {
// if ($expire == 0) { $edate = "Unset"; } else { $edate = date("Y-m-d", $expire); }
// list($gname) = $db->sql_fetchrow($db->sql_query("SELECT gname FROM ".$prefix."_nsngr_groups WHERE gid='$gid'"));
// $content .= "<big><b>·</b></big> $gname<br>\n";
// $content .= "<big><b> </b></big> Expires: <i>$edate</i><hr>\n";
//}
// NSN Groups Memberships - Recoded for RavenNuke76_020202
//RavenNuke76_020202_78 - corrected group membership display
//RavenNuke76_020202_79 - corrected hard-coding of literals
$content .= "<br /><u><b>"._GR_BLOCKMEMBERGROUPS.":</b></u><br />\n";
$grpmem = $db->sql_query("SELECT gid, edate FROM ".$prefix."_nsngr_users WHERE uid='$uid' ORDER BY gid");
while(list($gid, $expire) = $db->sql_fetchrow($grpmem)) {
if ($expire == 0) { $edate = _GR_NOTSET; } else { $edate = date("Y-m-d", $expire); }
list($gname) = $db->sql_fetchrow($db->sql_query("SELECT gname FROM ".$prefix."_nsngr_groups WHERE gid='$gid'"));
$content .= "<big><b>·</b></big> $gname<br>\n";
$content .= "<big><b> </b></big> "._GR_EXPIRES.": <i>$edate</i><br />\n";
}
$content .= "<hr>\n";
|
You will also need to add these defines to languages/groups/lang-english.php:
Code:
define("_GR_BLOCKMEMBERGROUPS","Group Memberships");
define("_GR_NOTSET","non-expiring");
|
|
|
|
|
 |
Barkley

|
Posted:
Sat Mar 18, 2006 11:21 am |
|
Worked like a charm. Thanks!  |
|
|
|
 |
montego

|
Posted:
Sat Mar 18, 2006 11:31 am |
|
|
|
 |
|