Page Index Toggle Pages: [1] 2 3 ... 12 Send TopicPrint
Very Hot Topic (More than 25 Replies) [DONE] User's More Membergroups! (Read 70793 times)
Christer Alexander
God Member
*****
Offline


Make my day...

Posts: 3443
Location: Lethbridge
Joined: Feb 10th, 2002
Gender: Male
[DONE] User's More Membergroups!
Apr 18th, 2002 at 5:35am
Print Post  
Allow Users to belong to more then one membergroup....I haven't tested this one yet(because my homework is killing me), but can someone take a look at the code and check it? don't think there should be any flies in this code(my frog ate them all Grin)

So...happy modding, and remember: Teenagers write the best mods(right omario?) Tongue

Download from attached file, EDIT: or wait for the updated version, which checks ALL fields for admin/gmod privs, board access etc
« Last Edit: Apr 26th, 2002 at 5:07am by Christer Alexander »  

UserMoreMembergroups.mod ( 5 KB | 151 Downloads )

Code
Select All
unless(0) { stab("LoonyPandora"); next; } 

Back to top
IP Logged
 
MoverPrime
Junior Member
**
Offline


I Am!

Posts: 79
Joined: Nov 28th, 2001
Gender: Male
Re: [BETA] User's More Membergroups!
Reply #1 - Apr 22nd, 2002 at 11:37am
Print Post  
But is it compatible with add more membergroups?  Smiley
  

probbly..
Back to top
WWWICQ  
IP Logged
 
DanX vs SoNiC
God Member
*****
Offline


TOTTENHAM HOTSPURS FOREVER!!!

Posts: 1675
Location: Scarborough
Joined: Sep 4th, 2001
Gender: Male
Re: [BETA] User's More Membergroups!
Reply #2 - Apr 22nd, 2002 at 3:27pm
Print Post  
Looks ok but I still haven't got FTP access so can't try it Sad
  

Email "The User Formally Known As Sonic : mail@danscotson.co.uk
Back to top
 
IP Logged
 
Shoeb Omar
God Member
*****
Offline


Mod Writer

Posts: 5665
Location: San Diego
Joined: Jun 29th, 2001
Gender: Male
Re: [BETA] User's More Membergroups!
Reply #3 - Apr 22nd, 2002 at 9:54pm
Print Post  
right krikkert Grin
  

YaBB SP2 BETA!
Now taking pay jobs in PHP or Perl.  Contact me for details.
Back to top
IP Logged
 
DanX vs SoNiC
God Member
*****
Offline


TOTTENHAM HOTSPURS FOREVER!!!

Posts: 1675
Location: Scarborough
Joined: Sep 4th, 2001
Gender: Male
Re: [BETA] User's More Membergroups!
Reply #4 - Apr 22nd, 2002 at 10:05pm
Print Post  
Quote:
right krikkert Grin


LEFT krikkert!!  Kiss
  

Email "The User Formally Known As Sonic : mail@danscotson.co.uk
Back to top
 
IP Logged
 
Christer Alexander
God Member
*****
Offline


Make my day...

Posts: 3443
Location: Lethbridge
Joined: Feb 10th, 2002
Gender: Male
Re: [BETA] User's More Membergroups!
Reply #5 - Apr 23rd, 2002 at 4:08pm
Print Post  
MoverPrime wrote on Apr 22nd, 2002 at 11:37am:
But is it compatible with add more membergroups?  Smiley


it should be compatible, but if it ain't, I'll write out a fix soon Grin
  

Code
Select All
unless(0) { stab("LoonyPandora"); next; } 

Back to top
IP Logged
 
itswheelie
Senior Member
****
Offline


I love YaBB 1 Gold!

Posts: 445
Joined: May 30th, 2001
Re: [BETA] User's More Membergroups!
Reply #6 - Apr 25th, 2002 at 9:43am
Print Post  
it isn't compataible with the Global Moderator mod.

The last step doesn't install.  I made some adjustments so that it did but it causes the server to come up with a misconfiguration error.

step 12 of the mod says in Load.pl  <search for>

Code
Select All
      if($userprofile{$user}->[7] ne 'Administrator') {
            $memberinfo{$user} = "$modinfo{$user}$groupinfo{$user}$memberinfo{$user}";
 



With the Global Moderator Mod installed (not the one with the Add more membergroups mod tho)

the relevant lines in Load.pl are

Code
Select All
      if( ($userprofile{$user}->[7] && $userprofile{$user}->[7] ne 'Administrator') || ($userprofile{$user}->[7] && $userprofile{$user}->[7] ne 'Global Moderator') ) { $groupinfo{$user} = "$userprofile{$user}->[7]<BR>"; }
      if($userprofile{$user}->[7] ne 'Administrator' && $userprofile{$user}->[7] ne 'Global Moderator') {
            $memberinfo{$user} = "$modinfo{$user}$groupinfo{$user}$memberinfo{$user}";
 



Once I make that change the server crash occurs.

can you make a fix please
  
Back to top
 
IP Logged
 
Christer Alexander
God Member
*****
Offline


Make my day...

Posts: 3443
Location: Lethbridge
Joined: Feb 10th, 2002
Gender: Male
Re: [BETA] User's More Membergroups!
Reply #7 - Apr 25th, 2002 at 1:22pm
Print Post  
I don't see anything wrong with the code??
  

Code
Select All
unless(0) { stab("LoonyPandora"); next; } 

Back to top
IP Logged
 
itswheelie
Senior Member
****
Offline


I love YaBB 1 Gold!

Posts: 445
Joined: May 30th, 2001
Re: [BETA] User's More Membergroups!
Reply #8 - Apr 26th, 2002 at 1:14am
Print Post  
well I get server misconfiguration error when I install this mod.  I have tracked the problem down to step 12, the one mentioned in my last post.

Code
Select All
<edit file>
Sources/Load.pl
</edit file>

<search for>
	if($userprofile{$user}->[7] ne 'Administrator') {
		$memberinfo{$user} = "$modinfo{$user}$groupinfo{$user}$memberinfo{$user}";
	}
</search for>

<add after>
fopen(USERFILE, "$memberdir/$user.kri");
@krimodsettings = <USERFILE>;
fclose(FILE);
foreach $setting (@krimodsettings) {
	chomp $setting;
	if($setting ne "") {
			if($krititleinfo{user} eq "") { $krititleinfo = $setting; }
			else {
		$krititleinfo{user} = "$krititleinfo{user}\n$setting"; }
}
</add after> 



as I mentioned above I have the Global Moderator mod installed and it is somehow causing a conflict with this mod in step 12.

could you take another look at it please
  
Back to top
 
IP Logged
 
itswheelie
Senior Member
****
Offline


I love YaBB 1 Gold!

Posts: 445
Joined: May 30th, 2001
Re: [BETA] User's More Membergroups!
Reply #9 - Apr 26th, 2002 at 3:28am
Print Post  
Is there a right bracket } missing from step 12 in Load.pl?

seems to be 7 left brackets and only 6 right brackets
  
Back to top
 
IP Logged
 
Christer Alexander
God Member
*****
Offline


Make my day...

Posts: 3443
Location: Lethbridge
Joined: Feb 10th, 2002
Gender: Male
Re: [BETA] User's More Membergroups!
Reply #10 - Apr 26th, 2002 at 4:47am
Print Post  
oh man! I didn't notice that I forgot to end the foreach statement. Replace step 12's Add After code with this:
Code
Select All
fopen(USERFILE, "$memberdir/$user.kri");
@krimodsettings = <USERFILE>;
fclose(FILE);
foreach $setting (@krimodsettings) {
 chomp $setting;
 if($setting ne "") {
   if($krititleinfo{user} eq "") { $krititleinfo = $setting; }
   else {
  $krititleinfo{user} = "$krititleinfo{user}\n$setting"; }
}
} 

  

Code
Select All
unless(0) { stab("LoonyPandora"); next; } 

Back to top
IP Logged
 
itswheelie
Senior Member
****
Offline


I love YaBB 1 Gold!

Posts: 445
Joined: May 30th, 2001
Re: [BETA] User's More Membergroups!
Reply #11 - Apr 26th, 2002 at 4:57am
Print Post  
well the good news is that it now installs perfectly Smiley

The bad news is that it only seems to recognize the first membergroup position.

My board has 4 private areas, each with its own membergroup.

When I set the positions for a member to get access to 2 of those private areas eg

first position:  consultant
second position: private member

when the member logs in all that he can see are those forums that are available to the "consultant". The private member forums remain hidden Sad
  
Back to top
 
IP Logged
 
Christer Alexander
God Member
*****
Offline


Make my day...

Posts: 3443
Location: Lethbridge
Joined: Feb 10th, 2002
Gender: Male
Re: [BETA] User's More Membergroups!
Reply #12 - Apr 26th, 2002 at 5:05am
Print Post  
yeah, it says that in the mod description:
"Only first field will be checked"

Do you want me to hack your suggestion in?
  

Code
Select All
unless(0) { stab("LoonyPandora"); next; } 

Back to top
IP Logged
 
itswheelie
Senior Member
****
Offline


I love YaBB 1 Gold!

Posts: 445
Joined: May 30th, 2001
Re: [BETA] User's More Membergroups!
Reply #13 - Apr 26th, 2002 at 5:07am
Print Post  
yes please.  I would like the mod to get members into more than one area if they are members of different membergroups.

thanks
  
Back to top
 
IP Logged
 
MoverPrime
Junior Member
**
Offline


I Am!

Posts: 79
Joined: Nov 28th, 2001
Gender: Male
Re: [DONE] User's More Membergroups!
Reply #14 - Apr 26th, 2002 at 11:30am
Print Post  
Me too pleaze thanx  Wink
  

probbly..
Back to top
WWWICQ  
IP Logged
 
Page Index Toggle Pages: [1] 2 3 ... 12
Send TopicPrint