News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Membergroups rename

Started by tranhiep_116, November 19, 2014, 09:30:34 PM

Previous topic - Next topic

tranhiep_116

Is it ok to change membergroups names, newbie, jr. member, hero etc to whatever I want to name them? If I can do this, does it affect current members in any bad way, or just a seamless change?

Thanks in advance  :laugh:

Arantor

Changing the names of groups is absolutely fine provided you don't try to put HTML in it.

br360

What about adding a new membergroup not post based; does that make a difference? I ask because I have a special usergroup that is in bold using html <b></b>, and it seems to be working fine over the last few years.

Sir Osis of Liver

Placing code tags in a membergroup name will usually break the edit function, and you have to clean it up in the database.  No idea why it works for you.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Illori

it works for that user because it is not over the max number of characters that fit in that field. it only breaks when it goes over that max and is not the correct complete html.

tranhiep_116

 i change that but no thing happen, every group work smoothy

Branko.

Quote from: br360 on November 19, 2014, 09:44:08 PM
What about adding a new membergroup not post based; does that make a difference? I ask because I have a special usergroup that is in bold using html <b></b>, and it seems to be working fine over the last few years.
It works for you because in the table membergroups, group name is defined as VARCHAR(size) text type (the maximum size is specified in parenthesis). Holds a variable length string and can contain letters, numbers, and special characters. Can store up to 255 characters. Only if you put a greater value than 255 it will be converted to a TEXT type.
Note:By default this value is varchar(80) and html can generate a problem if the number of characters is greater.

I agree with Arantor.  :)

I tested this with same result in online color field (the string without html) and works fine. In the first attempt string was truncated (and unusable). Later I increased varchar to the required value. In both cases there was no problem with the change of the field.
Here is my example:
For color in online list: #yourcolorcode; font-weight: bold;
For sql query: ALTER TABLE `smf_membergroups` MODIFY `online_color` varchar(27);

Cheers
Strong people don't put others down, they lift them up.
A clever person solves a problem. A wise person avoids it.

Arantor

Changing the size of field does have other consequences you might not be aware of ;)

tranhiep_116


Advertisement: