Page Index Toggle Pages: [1] 2  Send TopicPrint
Hot Topic (More than 10 Replies) How To Add More User Levels (Read 21157 times)
Dave Baughman
God Member
*****
Offline


I want my MTV

Posts: 2039
Location: Murfreesboro
Joined: May 18th, 2001
Gender: Male
How To Add More User Levels
Jun 8th, 2001 at 11:10pm
Print Post  
Step 1)

Open up the Load.pl file. This is the only file we'll be needing to edit, so this shouldn't be too hard.

Find this section:
[code]      if( $userprofile{$user}->[6] > $GodPostNum ) {
           $memberinfo{$user} = "$membergroups[6]";
           $memberstar{$user} = qq~<img src="$imagesdir/star.gif" border="0" alt="*"><img src="$imagesdir/star.gif" border="0" alt="*"><img src="$imagesdir/star.gif" border="0" alt="*"><img src="$imagesdir/star.gif" border="0" alt="*"><img src="$imagesdir/star.gif" border="0" alt="*">~;
     }
     elsif( $userprofile{$user}->[6] > $SrPostNum ) {
           $memberinfo{$user} = "$membergroups[5]";
           $memberstar{$user} = qq~<img src="$imagesdir/star.gif" border="0" alt="*"><img src="$imagesdir/star.gif" border="0" alt="*"><img src="$imagesdir/star.gif" border="0" alt="*"><img src="$imagesdir/star.gif" border="0" alt="*">~;
     }
     elsif( $userprofile{$user}->[6] > $FullPostNum ) {
           $memberinfo{$user} = "$membergroups[4]";
           $memberstar{$user} = qq~<img src="$imagesdir/star.gif" border="0" alt="*"><img src="$imagesdir/star.gif" border="0" alt="*"><img src="$imagesdir/star.gif" border="0" alt="*">~;
     }
     elsif( $userprofile{$user}->[6] > $JrPostNum ) {
           $memberinfo{$user} = "$membergroups[3]";
           $memberstar{$user} = qq~<img src="$imagesdir/star.gif" border="0" alt="*"><img src="$imagesdir/star.gif" border="0" alt="*">~;
     }
     else {
           $memberinfo{$user} = "$membergroups[2]";
           $memberstar{$user} = qq~<img src="$imagesdir/star.gif" border="0" alt="*">~;
     } [/code]
Okay, what that section does it this: It sees if the users post is greater than the number you have set in your settings.pl to be the God status posting number. If it's not, it sees if it's greater than the Senior level posting number. If not, it keeps going down the list, and finally if it's not greater than any posting level numbers, it sets the users status to newbie. Now, for the purpose of this tutorial, I'm gonna add three new levels. I'm also going to go into my admin center and change the first five setting levels, so 0-25 posts will be a newbie, 26-50 posts is a junior member, 51-100 posts is a full member, 101-150 posts is a senior member, and 151-200 posts is a god member. My three NEW status levels will be Hercules (201-250  posts), Titan (251-300 posts), and Zeus (500 posts and up). Here's what it's gonna look like:
[code]      if( $userprofile{$user}->[6] > 500 ) {
           $memberinfo{$user} = "Zeus";
           $memberstar{$user} = qq~<img src="$imagesdir/star.gif" border="0" alt="*"><img src="$imagesdir/star.gif" border="0" alt="*"><img src="$imagesdir/star.gif" border="0" alt="*"><img src="$imagesdir/star.gif" border="0" alt="*"><img src="$imagesdir/star.gif" border="0" alt="*"><img src="$imagesdir/star.gif" border="0" alt="*"><img src="$imagesdir/star.gif" border="0" alt="*"><img src="$imagesdir/star.gif" border="0" alt="*">~;
     }
     elsif( $userprofile{$user}->[6] > 250 ) {
           $memberinfo{$user} = "Titan";
           $memberstar{$user} = qq~<img src="$imagesdir/star.gif" border="0" alt="*"><img src="$imagesdir/star.gif" border="0" alt="*"><img src="$imagesdir/star.gif" border="0" alt="*"><img src="$imagesdir/star.gif" border="0" alt="*"><img src="$imagesdir/star.gif" border="0" alt="*"><img src="$imagesdir/star.gif" border="0" alt="*">~;
     }
     elsif( $userprofile{$user}->[6] > 200 ) {
           $memberinfo{$user} = "Hercules";
           $memberstar{$user} = qq~<img src="$imagesdir/star.gif" border="0" alt="*"><img src="$imagesdir/star.gif" border="0" alt="*"><img src="$imagesdir/star.gif" border="0" alt="*"><img src="$imagesdir/star.gif" border="0" alt="*"><img src="$imagesdir/star.gif" border="0" alt="*">~;
     }
     elsif( $userprofile{$user}->[6] > $GodPostNum ) {
           $memberinfo{$user} = "$membergroups[6]";
           $memberstar{$user} = qq~<img src="$imagesdir/star.gif" border="0" alt="*"><img src="$imagesdir/star.gif" border="0" alt="*"><img src="$imagesdir/star.gif" border="0" alt="*"><img src="$imagesdir/star.gif" border="0" alt="*"><img src="$imagesdir/star.gif" border="0" alt="*">~;
     }
     elsif( $userprofile{$user}->[6] > $SrPostNum ) {
           $memberinfo{$user} = "$membergroups[5]";
           $memberstar{$user} = qq~<img src="$imagesdir/star.gif" border="0" alt="*"><img src="$imagesdir/star.gif" border="0" alt="*"><img src="$imagesdir/star.gif" border="0" alt="*"><img src="$imagesdir/star.gif" border="0" alt="*">~;
     }
     elsif( $userprofile{$user}->[6] > $FullPostNum ) {
           $memberinfo{$user} = "$membergroups[4]";
           $memberstar{$user} = qq~<img src="$imagesdir/star.gif" border="0" alt="*"><img src="$imagesdir/star.gif" border="0" alt="*"><img src="$imagesdir/star.gif" border="0" alt="*">~;
     }
     elsif( $userprofile{$user}->[6] > $JrPostNum ) {
           $memberinfo{$user} = "$membergroups[3]";
           $memberstar{$user} = qq~<img src="$imagesdir/star.gif" border="0" alt="*"><img src="$imagesdir/star.gif" border="0" alt="*">~;
     }
     else {
           $memberinfo{$user} = "$membergroups[2]";
           $memberstar{$user} = qq~<img src="$imagesdir/star.gif" border="0" alt="*">~;
     } [/code]      
See the changes? We made the god posting level into and elsif statement from and if statement because the highest level need to go first. The first check is always an "if" check, all the middle ones should be "elsif" checks, and the last should be "else". You can make as many member levels as you want using this method. Hope this tutorial helps. =)

- DaveB
 http://www.davesworldzone.com
  

I'm not sure if it's ignorance or apathy, but I don't know and I don't care.
Back to top
WWW  
IP Logged
 
johnsirach
New Member
*
Offline


I love YaBB 1 Gold!

Posts: 3
Joined: May 27th, 2001
Re: How To Add More User Levels
Reply #1 - Jun 22nd, 2001 at 7:48am
Print Post  
This one is verry cool i gonna do it rihgt now on my board!!!!  Cheesy
  
Back to top
 
IP Logged
 
dOCdaS
God Member
*****
Offline



Posts: 1568
Location: Germany
Joined: May 27th, 2001
Gender: Male
Re: How To Add More User Levels
Reply #2 - Jul 17th, 2001 at 3:33pm
Print Post  
Lol, why don't you wait for "Add more MemberGroups" Mod? Would be much easier then! It will be released this week!
  
Back to top
WWWICQ  
IP Logged
 
Gobalopper
Junior Member
**
Offline



Posts: 89
Joined: Jul 27th, 2001
Re: How To Add More User Levels
Reply #3 - Jul 27th, 2001 at 9:20am
Print Post  
They don't show up when you click the user's profile, not sure why yet, but if I do I will report back. I am guessing you need to edit something in Profile.pl too.

---
I think it is somewhere in here, but I don't know what I would be changing... Smiley
Code
Select All
      if($settings[7] eq 'Administrator') {
            $position='';
            foreach $curl (@lines) {
                  if($curl ne $lines[1] && $curl ne $lines[2] && $curl ne $lines[3] && $curl ne $lines[4] && $curl ne $lines[5] && $curl ne $lines[6]) {
                        if($curl ne $lines[0]) { $position= qq~$position<option>$curl~; }
                        else { $position= qq~$position<option value="Administrator">$curl~; }
                  }
            }
            if($memsettings[7] eq 'Administrator') { $tt = $lines[0]; }
            else { $tt = $memsettings[7]; }
            print <<"EOT"; 

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


Linkin Park Fanatic

Posts: 298
Joined: May 30th, 2001
Gender: Male
Re: How To Add More User Levels
Reply #4 - Aug 1st, 2001 at 12:16am
Print Post  
if you add mroe membergroups this way, can you still give people special titles?? I installed the more member groups mod and it works, but i cant give members another title Undecided
  
Back to top
WWWAIM  
IP Logged
 
Gobalopper
Junior Member
**
Offline



Posts: 89
Joined: Jul 27th, 2001
Re: How To Add More User Levels
Reply #5 - Aug 1st, 2001 at 7:53am
Print Post  
Yep I am pretty sure you can, the only bug I have found is the profile display of rank not showing up properly.
  
Back to top
 
IP Logged
 
jonnytyson
New Member
*
Offline


I love YaBB 1 Gold!

Posts: 9
Joined: Aug 23rd, 2001
Re: How To Add More User Levels
Reply #6 - Aug 23rd, 2001 at 2:33pm
Print Post  
what tha......
is this 4 the UBB or this YaBB ?????
i need a hacker 2 help me on my UBB tho..
plz reply if any  1 will help  Cry Laterz!
  
Back to top
 
IP Logged
 
Administrator
Forum Administrator
*****
Offline


Yummm

Posts: 7
Location: Modders Rile
Joined: Oct 7th, 2014
Gender: Male
Re: How To Add More User Levels
Reply #7 - Aug 23rd, 2001 at 3:22pm
Print Post  
This is only for YaBB!
  

The Administrator.
Back to top
WWW  
IP Logged
 
Gobalopper
Junior Member
**
Offline



Posts: 89
Joined: Jul 27th, 2001
Re: How To Add More User Levels
Reply #8 - Dec 17th, 2001 at 9:46am
Print Post  
Here is a fix for getting it to work in profiles. This works in SP1 I don't know about Gold.

First find this in Profile.pl
Code
Select All
      if($memsettings[6] > $GodPostNum) { $memberinfo = "$membergroups[6]"; }
      elsif($memsettings[6] > $SrPostNum) { $memberinfo = "$membergroups[5]"; }
      elsif($memsettings[6] > $FullPostNum) { $memberinfo = "$membergroups[4]"; }
      elsif($memsettings[6] > $JrPostNum) { $memberinfo = "$membergroups[3]"; } 



And replace it with:
Code
Select All
      if($memsettings[6] > 500 ) { $memberinfo = "Zeus"; }
      elsif($memsettings[6] > 250 ) { $memberinfo = "Titan"; }
      elsif($memsettings[6] > 200 ) { $memberinfo = "Hercules"; }
      elsif($memsettings[6] > $GodPostNum) { $memberinfo = "$membergroups[6]"; }
      elsif($memsettings[6] > $SrPostNum) { $memberinfo = "$membergroups[5]"; }
      elsif($memsettings[6] > $FullPostNum) { $memberinfo = "$membergroups[4]"; }
      elsif($memsettings[6] > $JrPostNum) { $memberinfo = "$membergroups[3]"; } 



You can of course change the names used and post levels.
  
Back to top
 
IP Logged
 
dvdsecretz
New Member
*
Offline


I love YaBB 1G - SP1!

Posts: 21
Joined: Feb 20th, 2002
Re: How To Add More User Levels
Reply #9 - Feb 20th, 2002 at 6:13am
Print Post  
hi

can anyone help me with this please?

i edited the user levels in the Load.pl file that were already there to my own names i.e. new member, member, senior member etc.. (see the cose below)

i just made one of my friends a mod who has just joined my forum and his name has 5 green starts and says 'Moderator' but it also says 'New Member' below 'Moderator', but i don't want that these...

how could i get rid of that and let it just display 'Moderator'

please help.. the code is below

dvdsecretz
  
Back to top
 
IP Logged
 
dvdsecretz
New Member
*
Offline


I love YaBB 1G - SP1!

Posts: 21
Joined: Feb 20th, 2002
Re: How To Add More User Levels
Reply #10 - Feb 20th, 2002 at 6:14am
Print Post  
     if($userprofile{$user}->[6] > $GodPostNum) {
           $memberinfo{$user} = "Legend Member";
           $memberstar{$user} = qq~<img src="$imagesdir/star.gif" border="0" alt="*"><img src="$imagesdir/star.gif" border="0" alt="*"><img src="$imagesdir/star.gif" border="0" alt="*"><img src="$imagesdir/star.gif" border="0" alt="*"><img src="$imagesdir/star.gif" border="0" alt="*">~;
     }
     elsif($userprofile{$user}->[6] > $SrPostNum) {
           $memberinfo{$user} = "Senior Member";
           $memberstar{$user} = qq~<img src="$imagesdir/star.gif" border="0" alt="*"><img src="$imagesdir/star.gif" border="0" alt="*"><img src="$imagesdir/star.gif" border="0" alt="*"><img src="$imagesdir/star.gif" border="0" alt="*">~;
     }
     elsif($userprofile{$user}->[6] > $FullPostNum) {
           $memberinfo{$user} = "Member";
           $memberstar{$user} = qq~<img src="$imagesdir/star.gif" border="0" alt="*"><img src="$imagesdir/star.gif" border="0" alt="*"><img src="$imagesdir/star.gif" border="0" alt="*">~;
     }
     elsif($userprofile{$user}->[6] > $JrPostNum) {
           $memberinfo{$user} = "Junior Member";
           $memberstar{$user} = qq~<img src="$imagesdir/star.gif" border="0" alt="*"><img src="$imagesdir/star.gif" border="0" alt="*">~;
     }
     else {
           $memberinfo{$user} = "New Member";
           $memberstar{$user} = qq~<img src="$imagesdir/star.gif" border="0" alt="*">~;
     }
     if(exists $moderators{$user} && $sender ne "im") {
           $modinfo{$user} = "<i>Moderator</i><BR>";
           $memberstar{$user} = qq~<img src="$imagesdir/starmod.gif" border="0" alt="*"><img src="$imagesdir/starmod.gif" border="0" alt="*"><img src="$imagesdir/starmod.gif" border="0" alt="*"><img src="$imagesdir/starmod.gif" border="0" alt="*"><img src="$imagesdir/starmod.gif" border="0" alt="*">~;
     }
     if($userprofile{$user}->[7] eq 'Administrator') {
           $memberstar{$user} = qq~<img src="$imagesdir/staradmin.gif" border="0" alt="*"><img src="$imagesdir/staradmin.gif" border="0" alt="*"><img src="$imagesdir/staradmin.gif" border="0" alt="*"><img src="$imagesdir/staradmin.gif" border="0" alt="*"><img src="$imagesdir/staradmin.gif" border="0" alt="*">~;
           $memberinfo{$user} = "<B>Administrator</B>";
     }
     if($userprofile{$user}->[7] && $userprofile{$user}->[7] ne 'Administrator') { $groupinfo{$user} = "$userprofile{$user}->[7]<BR>"; }
     if($userprofile{$user}->[7] ne 'Administrator') {
           $memberinfo{$user} = "$modinfo{$user}$groupinfo{$user}$memberinfo{$user}";
     }

     if($userprofile{$user}->[6] > 100000) { $userprofile{$user}->[6] = "$txt{'683'}"; }

     $yyUDLoaded{$user} = 1;
     return 1;
}
  
Back to top
 
IP Logged
 
Dave Baughman
God Member
*****
Offline


I want my MTV

Posts: 2039
Location: Murfreesboro
Joined: May 18th, 2001
Gender: Male
Re: How To Add More User Levels
Reply #11 - Feb 20th, 2002 at 2:40pm
Print Post  
Please erase those posts and put them in a thread in the help board... this is a tutorial, not a thread for posting code that isn't working. Thanks.
  

I'm not sure if it's ignorance or apathy, but I don't know and I don't care.
Back to top
WWW  
IP Logged
 
Darkened
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 57
Joined: Mar 20th, 2002
Re: How To Add More User Levels
Reply #12 - Mar 20th, 2002 at 4:01am
Print Post  
hey, nice idea, it didn't work for me, just gave me an error page when i refreshed my boards, shame...

but i had an idea... zeus... is male... so what i was thinking is...

if($userprofile{$user} bla = $female, $userprofile{$user}->[6] > 500 ) {
           $memberinfo{$user} = "Hera";
           $memberstar{$user} = qq~<img src="$imagesdir/star.gif" border="0" alt="*">~;
     }
elseif($userprofile{$user} bla = $male, $userprofile{$user}->[6] > 500 ) {
           $memberinfo{$user} = "Zeus";
           $memberstar{$user} = qq~<img src="$imagesdir/star.gif" border="0" alt="*">~;
     }

i would try this myself but firstly your mod didn't work for mine and secondly i would have no idea how to get hold of the gender information... so would this work??? Grin
  
Back to top
 
IP Logged
 
Shoeb Omar
God Member
*****
Offline


Mod Writer

Posts: 5665
Location: San Diego
Joined: Jun 29th, 2001
Gender: Male
Re: How To Add More User Levels
Reply #13 - Mar 20th, 2002 at 4:18am
Print Post  
it owuldnt be a comma but an && operator Smiley
  

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


I love YaBB 1G - SP1!

Posts: 57
Joined: Mar 20th, 2002
Re: How To Add More User Levels
Reply #14 - Mar 20th, 2002 at 5:10am
Print Post  
lol, ok mister smarty pants... you know i don't know perl yet you mock me *sobs* lol

it is plausable tho right?
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: [1] 2 
Send TopicPrint