Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Ravens PHP Scripts And Web Hosting Forum Index -> Raven's RavenNuke(tm) v2.00.00 - v2.02.00 Distro
Author Message
Barkley
New Member
New Member


Joined: Mar 12, 2006
Posts: 14

PostPosted: Mon Mar 13, 2006 8:10 pm Reply with quote

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! Very Happy
 
View user's profile Send private message
CodyG
Life Cycles Becoming CPU Cycles


Joined: Jan 02, 2003
Posts: 712
Location: Vancouver Island

PostPosted: Tue Mar 14, 2006 8:43 am Reply with quote

Yea... RavenNuke rocks!

Are you looking at all this as admin or as user?

_________________
"We want to see if life is ubiquitous." D.Goldin 
View user's profile Send private message
Barkley
PostPosted: Tue Mar 14, 2006 9:02 am Reply with quote

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.

Image

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
PostPosted: Tue Mar 14, 2006 11:04 am Reply with quote

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: 9453
Location: Arizona

PostPosted: Thu Mar 16, 2006 7:29 pm Reply with quote

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! 
View user's profile Send private message Visit poster's website
Barkley
PostPosted: Thu Mar 16, 2006 8:09 pm Reply with quote

I assume 2.02.02 has not been released yet?

Is there a quick fix for this that can be done by hand?
 
montego
PostPosted: Thu Mar 16, 2006 8:18 pm Reply with quote

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>&middot;</b></big> $gname<br>\n";
    //    $content .= "<big><b>&nbsp;&nbsp;</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>&middot;</b></big> $gname<br>\n";
            $content .= "<big><b>&nbsp;&nbsp;</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
PostPosted: Sat Mar 18, 2006 11:21 am Reply with quote

Worked like a charm. Thanks! Smile
 
montego
PostPosted: Sat Mar 18, 2006 11:31 am Reply with quote

RavensScripts
 
Display posts from previous:       
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Ravens PHP Scripts And Web Hosting Forum Index -> Raven's RavenNuke(tm) v2.00.00 - v2.02.00 Distro

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©