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

26.05.13 at 09:06:46, Welcome, Guest. Please Login or Register

Choose Language:
Pages: 1 ... 4 5 6 7 8 ... 12
[DONE] User's More Membergroups! (Read 27176 times)
goatroper
Bloody Novice
*
Offline

Posts: 5



Reply #75 - 03.07.02 at 17:40:53  
If you'd be willing to pass along the code, I'd like it too.
 
IP Logged
 
Schoolmarm
Bloody Novice
*
Offline

Posts: 43



Reply #76 - 03.07.02 at 19:09:51  
Not so fast guys. It appears that I have a little bug that needs squishing...

Christer ... Please Help.

The new mod works great except for one little thing in two areas.

In both the recent.pl and search.pl.. none of my hidden boards are recognized to belonging to their specified group.

Example:
Members Only Boards are not showing up in the Last 10 posts for those members given permission (assigned the member membergroup in position 2). This is also true for the Global Mods who also have the members membergroup as their 2nd position.

This is the Same for the Search Function -- The Hidden boards are not showing up for those belonging to the appropriate membergroup in position two.

I use position 2 all the time cause that is the only one I am using for additional membergroups at this time. The first position is reserved for the post count groups and Admin or GMods.

Perhaps, this portion of the code was not rewritten when the changes were made to allow all positions to be checked for permission??

I hope you can help me out here. I thought I had tested it thoroughly prior to putting in on my active forum. But now its live.. I am stuck  *(whine).
 
IP Logged
 
Schoolmarm
Bloody Novice
*
Offline

Posts: 43



Reply #77 - 04.07.02 at 10:25:56  
Okay, I found the problem and solutions  Cheesy

In Recent.pl : The RecentPosts subroutine was not modified in the original mod. That is why my members couldn't see any posts from their accessible "hidden" boards.

Here is the code I added: Now mind, I am only a perl newbie so I just copied the codes Christer had for other subs and edited it in here.

Code:
### sub RecentPosts ###


<edit file>
Sources/Recent.pl
</edit file>


<search for>
@membergroups = split( /,/, $cataccess{$curcat} );
foreach $tmpa (@membergroups) {
if( $tmpa eq $settings[7]) { $openmemgr{$curcat} = 1; last; }
}
</search for>

<replace>
@membergroups = split( /,/, $cataccess{$curcat} );
$openmemgr{$curcat} = 0;
fopen(accset, "$memberdir/$username.kri");
@youraccess = <accset>;
fclose(accset);
foreach $value (@youraccess) { chomp $value; }
foreach $tmpa (@membergroups) {
if($tmpa eq $settings[7] || $tmpa eq $youraccess[0] || $tmpa eq $youraccess[1] || $tmpa eq $youraccess[2] || $tmpa eq $youraccess[3] || $tmpa eq $youraccess[4]) { $openmemgr{$curcat} = 1; last; } }
</replace>


Now, for the Search.pl  --

This one was my fault -- I did not edit the previous AMM modifications correctly to be compatible. But, am sharing the codes for review. (again, I just took Christer's and rearranged the placement to be compatible) It works for me  Smiley

Code:
### Add More Membergroups Mod TO User's More Membergroups#####

<edit file>
Sources/Search.pl
</edit file>


<search for>
my($mscount);
$mscount=0;
@membergroups = split( /,/, $cataccess{$curcat} );
foreach $tmpa (@membergroups) {
$tmpa =~ s/\n//g;
if( $settings[7] eq "$tmpa") { $openmemgr{$curcat} = 1; last; }
while($MemStat[$mscount]) {
if( $settings[6] >= $MemPostNum[$mscount] && $MemPostNum[$mscount] ne "x") {
$memberinfo = "$MemStat[$mscount]"; }
++$mscount;

}
if ( $memberinfo eq $tmpa ) { $openmemgr{$curcat} = 1; last; }
}
if( ! $cataccess{$curcat} || $settings[7] eq 'Administrator' ) {
$openmemgr{$curcat} = 1;
}
unless( $openmemgr{$curcat} ) { next; }
</search for>


<replace>
foreach $curcat (@categories) {
chomp $curcat;
fopen(FILE, "$boardsdir/$curcat.cat");
$catname{$curcat} = <FILE>;
chomp $catname{$curcat};
$cataccess{$curcat} = <FILE>;
chomp $cataccess{$curcat};
@{$catboards{$curcat}} = <FILE>;
fclose(FILE);
$openmemgr{$curcat} = 0;
fopen(accset, "$memberdir/$username.kri");
@youraccess = <accset>;
fclose(accset);
foreach $value (@youraccess) { chomp $value; }
my($mscount);
$mscount=0;
@membergroups = split( /,/, $cataccess{$curcat} );
foreach $tmpa (@membergroups) {
$tmpa =~ s/\n//g;
if($tmpa eq $settings[7] || $tmpa eq $youraccess[0] || $tmpa eq $youraccess[1] || $tmpa eq $youraccess[2] || $tmpa eq $youraccess[3] || $tmpa eq $youraccess[4]) { $openmemgr{$curcat} = 1; last; }
while($MemStat[$mscount]) {
if( $settings[6] >= $MemPostNum[$mscount] && $MemPostNum[$mscount] ne "x") {
$memberinfo = "$MemStat[$mscount]"; }
++$mscount;

}
if ( $memberinfo eq $tmpa ) { $openmemgr{$curcat} = 1; last; }
}
if( ! $cataccess{$curcat} || $settings[7] eq 'Administrator' ) {
$openmemgr{$curcat} = 1;
}
unless( $openmemgr{$curcat} ) { next; }
</replace>


These appear to work for me but if anyone notices a problem -- please give a holler.
 
IP Logged
 
Schoolmarm
Bloody Novice
*
Offline

Posts: 43



Reply #78 - 05.07.02 at 21:00:05  
I think I found a bug...

Whenever a member changes/updates their profile, they lose their .kri settings.

I don't think this one is related to compatibility issues. I have studied the profile.pl file but don't have a clue how to fix. Any help would be greatly appreciated. Smiley I have attached my profile.pl file.

I have AMM installed. (I think that is the only other relevent mod) - Can someone give a look?
 
IP Logged
 
BHRA Webmaster
Mod Author of the Year 2002
*****
Offline

BHRA Headquarters, United Kingdom
Posts: 5238



Reply #79 - 09.07.02 at 21:24:05  
Look in Profile.pl for this Code:

           fopen( FILE, ">$memberdir/$member{'username'}.kri", 1);
           print FILE "$FORM{'title1'}\n";
           print FILE "$FORM{'title2'}\n";
           print FILE "$FORM{'title3'}\n";
           print FILE "$FORM{'title4'}\n";
           print FILE "$FORM{'title5'}\n";
           fclose(FILE);


What this says is "take the membergroup settings from the form and save them to the username.kri file". But if anyone other than the administrator edits the profile, there will be no membergroup settings in the form, and it will overwrite all the settings with null values.

What you need to do, is ONLY save the .kri file if the profile is modified by an administrator, by using the following Code:

           if($settings[7] eq "Administrator") {
                 fopen( FILE, ">$memberdir/$member{'username'}.kri", 1);
                 print FILE "$FORM{'title1'}\n";
                 print FILE "$FORM{'title2'}\n";
                 print FILE "$FORM{'title3'}\n";
                 print FILE "$FORM{'title4'}\n";
                 print FILE "$FORM{'title5'}\n";
                 fclose(FILE);
           }



 
IP Logged
 

...
World Domination, one smiley at a time!
Schoolmarm
Bloody Novice
*
Offline

Posts: 43



Reply #80 - 09.07.02 at 22:02:32  
Thanks BHRA  Smiley

Your solution was perfect! Now, when members change their profile they won't lose their other membergroup (.kri) settings.
 
IP Logged
 
Shaggy
Hacker Wannabe
**
Offline

Posts: 50



Reply #81 - 12.07.02 at 15:21:22  
Thanks for the fix BHRA....I was going to mention the same problem.
 
IP Logged
 
huijaa
Fulltime Hacker
***
Offline

Zoetermeer, Netherlands
Posts: 173



Reply #82 - 12.07.02 at 22:27:22  
This mod gives error at step no 7,10 and 11 ...Sorry, it don't work.
 
IP Logged
 

WorkBar Mod...Planning[0.5%]
Dutch Mod...Planning[99.5%]
Jake
Hacker God
*****
Offline

Posts: 1265



Reply #83 - 16.07.02 at 20:19:10  
i install this mod manually
it seems to be incompatible in BroadIndex.pl [i've installed AMM before]
in this mod Code:
<search for>
@membergroups = split( /,/, $cataccess{$curcat} );
$openmemgr{$curcat} = 0;
foreach $tmpa (@membergroups) { if($tmpa eq $settings[7]) { $openmemgr{$curcat} = 1; last; } }
</search for>

<replace>
@membergroups = split( /,/, $cataccess{$curcat} );
$openmemgr{$curcat} = 0;
fopen(accset, "$memberdir/$username.kri");
@youraccess = <accset>;
fclose(accset);
foreach $value (@youraccess) { chomp $value; }
foreach $tmpa (@membergroups) {
if($tmpa eq $settings[7] || $tmpa eq $youraccess[0] || $tmpa eq $youraccess[1] || $tmpa eq $youraccess[2] || $tmpa eq $youraccess[3] || $tmpa eq $youraccess[4]) { $openmemgr{$curcat} = 1; last; } }
</replace>

in AMM mod Code:
<search for>
foreach $tmpa (@membergroups) { if($tmpa eq $settings[7]) { $openmemgr{$curcat} = 1; last; } }
if(!$cataccess{$curcat} || $settings[7] eq 'Administrator') { $openmemgr{$curcat} = 1; }
</search for>

<replace>
my($mscount);
$mscount=0;
foreach $tmpa (@membergroups) {
if( $tmpa eq $settings[7]) { $openmemgr{$curcat} = 1; last; }
while($MemStat[$mscount]) {
if($settings[6] >= $MemPostNum[$mscount] && $MemPostNum[$mscount] ne "x") {
$memberinfo = "$MemStat[$mscount]"; }
++$mscount;
}
if ( $memberinfo eq $tmpa ) { $openmemgr{$curcat} = 1; last; }
}
if( ! $cataccess{$curcat} || $settings[7] eq 'Administrator' ) { $openmemgr{$curcat} = 1; }
</replace>

i've some problem with this line Code:
foreach $tmpa (@membergroups) { if($tmpa eq $settings[7]) { $openmemgr{$curcat} = 1; last; } } 


Any solution please
 
IP Logged
 

...  ...  ...
Jake
Guest





Reply #84 - 18.07.02 at 10:29:09  
just a simple question
if i 've installed AMM and User_Online_color addon
how about color of user'll show on broad index page
 
IP Logged
 
goatroper
Bloody Novice
*
Offline

Posts: 5



Reply #85 - 19.07.02 at 14:56:40  
??? I need help with (I think) one area of Profile.pl  The mod is "working" on my test board , except that member groups don't show up in the positions 2-6 dropdown.  I think I've traced the problem to step 2 of the mod.

Where did you place the new code in profile to make it read the member groups from AMM?
 
IP Logged
 
Ya
Guest





Reply #86 - 31.07.02 at 01:05:03  
I'm having error during step 12 and 27 using boardmod, i installed poll mod 2.0 and more board options
 
IP Logged
 
Jake
Guest





Reply #87 - 31.07.02 at 04:29:42  
is this mod a beta one or complete Done
i dont sure the lates version is UserMoreMembergroupsfinal3_-_Fixed.mod  posted by andyl56 post#72 page 5 or UserMoreMembergroupsfinal3 posted by Christer post#52 page 4    Grin Grin


 
IP Logged
 
Christer Alexander
Moderator
*****
Offline

Lethbridge, Alberta, Canada
Posts: 3443



Reply #88 - 31.07.02 at 09:51:09  
whichever comes last, I have yet to read through them Grin
 
IP Logged
 

Code:
 
unless(0) { stab("LoonyPandora"); next; }
Jake
Guest





Reply #89 - 01.08.02 at 19:18:15  
i think someone should make this mod full compatible with Addmoremembergroup mod
that will be so big! Roll Eyes
 
IP Logged
 
Pages: 1 ... 4 5 6 7 8 ... 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