Welcome, Guest. Please Login or Register.
April 20, 2024, 06:29:36 AM
Home Help Search Log in Register
News: If you are still using YaBB SE, please consider upgrading to SMF as soon as possible.

YaBB SE Community  |  Development  |  Mod Ideas and Creation  |  Member Levels « previous next »
Pages: [1] Reply Ignore Print
Author Topic: Member Levels  (Read 5952 times)
Tom38Spcl
Noobie
*
Posts: 8


I'm a llama!

Member Levels
« on: February 02, 2004, 10:23:01 PM »
Reply with quote

I know this has been asked before but after searching the posts here for an hour I could not find a useful or understandable answer. (call me dumb if you like ;)

I have taken over an older board with members who have over 5000 posts. I would like to add in more member levels than just the 4 that are already there.

Can someone explain to me how to do this?

Thanks
Tom
Logged
Shadow's Pawn
Support Team
YaBB God
*****
Posts: 597


ich soll nicht toten

ICQ - 8039201shadowpawn@hotmail.com WWW
Re:Member Levels
« Reply #1 on: February 02, 2004, 11:23:41 PM »
Reply with quote

Look at Load.php.  If you know a bit of php, then it is pretty much self explanatory.  Otherwise, you can look for the "Add More Membergroups" mod...
Logged

apologize \A*pol"o*gize\, v. i. - To lay the foundation for a future offense.
Tom38Spcl
Noobie
*
Posts: 8


I'm a llama!

Re:Member Levels
« Reply #2 on: February 03, 2004, 12:09:33 AM »
Reply with quote

Look at Load.php.  If you know a bit of php, then it is pretty much self explanatory.  Otherwise, you can look for the "Add More Membergroups" mod...


Been there Done that. Sorry but I really don't think that this is Self Explanitory. I do know a LITTLE php and can edit it but can not find where the values are placed etc. Is it necessary to edit the tables through MySql to add in the extra setting etc? I have received in a bunch of similar messages saying it is easy or to look for the mods posts. However no one seems to have a direct answer and NONE of the treads about this topic explain how to actually do this and MOST are about 2 years and 3 versions old.  Would SOMEONE please help those of us out who really could use this and post something of value?

Thanks
Tom
Logged
Shadow's Pawn
Support Team
YaBB God
*****
Posts: 597


ich soll nicht toten

ICQ - 8039201shadowpawn@hotmail.com WWW
Re:Member Levels
« Reply #3 on: February 03, 2004, 04:14:44 AM »
Reply with quote

I assume you want these membergroups to be post based.

Open up Load.php and look for this line:


   /* create the memberinfo and memberstars entries */


Now look at the entries beneath it.  For instance:


   elseif ($userprofile[$user]['posts'] > $SrPostNum)
   {
      $memberinfo[$user] = "$membergroups[5]";
      $memberstar[$user] = "<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=\"*\" />";
   }


As you can see, this says that if the post count is higher than the Sr. Post count, then give them this membergroup, and these stars.  Of course, as you know, the Sr. Post count is set in "Forum Preferences and Settings."

Now, you can easily hardcode in new values here.  For instance, if you want a membergroup for people with more than 1000 posts, you could do something like this:


   if ($userprofile[$user]['posts'] > 1000)
   {
      $memberinfo[$user] = "$txt[newgroup];";
      $memberstar[$user] = "<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=\"*\" />";
   }


Then you would just change the if on the god post part to an elseif and add this piece of code right before the god post.  Also the $txt[newgroup] can be set to whatever you want the group to be, but set it in english.lng... or you can just hardcode the titles into Load.php

As you can see, the img's are each one of those little stars, so just add more img src tags to get more stars.  Or you can use different stars.

I know this works, because I've done basically this sort of thing on some of my sites.  

Hope this works for you.



Also, as I stated before, there is a mod that does basically this same thing in the Completed Mods board somewhere.  If you just scroll through the pages of that board for a while, you'll find it.


Editted to correct typing mistake
« Last Edit: February 03, 2004, 08:19:06 PM by Shadow's Pawn » Logged

apologize \A*pol"o*gize\, v. i. - To lay the foundation for a future offense.
Tom38Spcl
Noobie
*
Posts: 8


I'm a llama!

Re:Member Levels
« Reply #4 on: February 03, 2004, 02:46:19 PM »
Reply with quote

THANK YOU!!!! I really do appreciate the time you took to spell this out. I had it ALMOST right myself but kept getting parse errors. This worked out great. There is one change I had to make however. You had

$memberinfo[$user] = "      $memberinfo[$user] = $txt[newgroup];";

I had to change it to read....

$memberinfo[$user] = "$txt[newgroup]";

and then define the $txt in the english.lng as you suggested.

I thank you, my group thanks you.
You should have them Sticky Post this or add it to the MOD FAQ for others to read without having to dig through thousands of posts to find ;)

Tom
Logged
Shadow's Pawn
Support Team
YaBB God
*****
Posts: 597


ich soll nicht toten

ICQ - 8039201shadowpawn@hotmail.com WWW
Re:Member Levels
« Reply #5 on: February 03, 2004, 08:11:13 PM »
Reply with quote

I must have made a mistake when pasting the code in.  I fixed it in my original post so that no one will mess up if they follow my instructions.

Glad you got it working.
Logged

apologize \A*pol"o*gize\, v. i. - To lay the foundation for a future offense.
Pages: [1] Reply Ignore Print 
YaBB SE Community  |  Development  |  Mod Ideas and Creation  |  Member Levels « previous - next »
 


Powered by MySQL Powered by PHP YaBB SE Community | Powered by YaBB SE
© 2001-2003, YaBB SE Dev Team. All Rights Reserved.
SMF 2.1.4 © 2023, Simple Machines
Valid XHTML 1.0! Valid CSS

Page created in 0.024 seconds with 20 queries.