The BoardMod Project
 The Project | News | Downloads | Mods | FAQ | Templates | Chat | Forum
BoardMod Support Forum
[ Home | Help | Search | Login | Register ]  

19.06.13 at 11:52:47, Welcome, Guest. Please Login or Register

Choose Language:
Pages: 1 2 3 ... 12
[DONE] User's More Membergroups! (Read 27408 times)
Christer Alexander
Moderator
*****
Offline

Lethbridge, Alberta, Canada
Posts: 3443



18.04.02 at 06:35:35  
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: 26.04.02 at 06:07:11 by Christer Alexander »  
IP Logged
 

Code:
 
unless(0) { stab("LoonyPandora"); next; }
MoverPrime
Hacker Wannabe
**
Offline

Posts: 79



Reply #1 - 22.04.02 at 12:37:22  
But is it compatible with add more membergroups?  Smiley
 
IP Logged
 

probbly..
DanX vs SoNiC
Hacker God
*****
Offline

Posts: 1675



Reply #2 - 22.04.02 at 16:27:49  
Looks ok but I still haven't got FTP access so can't try it Sad
 
IP Logged
 

Email "The User Formally Known As Sonic : mail@danscotson.co.uk
Shoeb Omar
Moderator
*****
Offline

San Diego, California, USA
Posts: 5665



Reply #3 - 22.04.02 at 22:54:16  
right krikkert Grin
 
IP Logged
 

YaBB SP2 BETA!
Now taking pay jobs in PHP or Perl.  Contact me for details.
DanX vs SoNiC
Hacker God
*****
Offline

Posts: 1675



Reply #4 - 22.04.02 at 23:05:57  
Shoeb Omar wrote on 22.04.02 at 22:54:16:
right krikkert Grin


LEFT krikkert!!  Kiss
 
IP Logged
 

Email "The User Formally Known As Sonic : mail@danscotson.co.uk
Christer Alexander
Moderator
*****
Offline

Lethbridge, Alberta, Canada
Posts: 3443



Reply #5 - 23.04.02 at 17:08:32  
MoverPrime wrote on 22.04.02 at 12:37:22:
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
 
IP Logged
 

Code:
 
unless(0) { stab("LoonyPandora"); next; }
itswheelie
Hacker Expert
****
Offline

Posts: 445



Reply #6 - 25.04.02 at 10:43:02  
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:
      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:
      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
« Last Edit: 25.04.02 at 11:01:21 by itswheelie »  
IP Logged
 
Christer Alexander
Moderator
*****
Offline

Lethbridge, Alberta, Canada
Posts: 3443



Reply #7 - 25.04.02 at 14:22:23  
I don't see anything wrong with the code??
 
IP Logged
 

Code:
 
unless(0) { stab("LoonyPandora"); next; }
itswheelie
Hacker Expert
****
Offline

Posts: 445



Reply #8 - 26.04.02 at 02:14:29  
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:
<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
 
IP Logged
 
itswheelie
Hacker Expert
****
Offline

Posts: 445



Reply #9 - 26.04.02 at 04:28:52  
Is there a right bracket } missing from step 12 in Load.pl?

seems to be 7 left brackets and only 6 right brackets
 
IP Logged
 
Christer Alexander
Moderator
*****
Offline

Lethbridge, Alberta, Canada
Posts: 3443



Reply #10 - 26.04.02 at 05:47:35  
oh man! I didn't notice that I forgot to end the foreach statement. Replace step 12's Add After code with this: Code:
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"; }
}
}
 
IP Logged
 

Code:
 
unless(0) { stab("LoonyPandora"); next; }
itswheelie
Hacker Expert
****
Offline

Posts: 445



Reply #11 - 26.04.02 at 05:57:43  
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
 
IP Logged
 
Christer Alexander
Moderator
*****
Offline

Lethbridge, Alberta, Canada
Posts: 3443



Reply #12 - 26.04.02 at 06:05:25  
yeah, it says that in the mod description:
"Only first field will be checked"

Do you want me to hack your suggestion in?
 
IP Logged
 

Code:
 
unless(0) { stab("LoonyPandora"); next; }
itswheelie
Hacker Expert
****
Offline

Posts: 445



Reply #13 - 26.04.02 at 06:07:51  
yes please.  I would like the mod to get members into more than one area if they are members of different membergroups.

thanks
 
IP Logged
 
MoverPrime
Hacker Wannabe
**
Offline

Posts: 79



Reply #14 - 26.04.02 at 12:30:33  
Me too pleaze thanx  Wink
 
IP Logged
 

probbly..
Pages: 1 2 3 ... 12
© 2000-2012 by - All rights reserved.

Project website hosting proudly sponsored and provided by UK2 Hosting
 The Project | News | Downloads | Mods | FAQ | Templates | Chat | Forum