Display membergroup(s) in member profile

Started by eloycartw, May 11, 2022, 08:20:26 AM

Previous topic - Next topic

eloycartw

Hi,
How can we prevent a members membergroups from being displayed?

We are prototyping on MAMP 6.6, SMF 2.1 clean install, SMF prefixes. PHP 7.4.2, MySQL 5.7.34

Thank you

Doug Heffernan

Quote from: eloycartw on May 11, 2022, 08:20:26 AMHi,
How can we prevent a members membergroups from being displayed?

We are prototyping on MAMP 6.6, SMF 2.1 clean install, SMF prefixes. PHP 7.4.2, MySQL 5.7.34

Thank you

Hello. Do you mean the the post based membergroups?

Sir Osis of Liver

This removes it from profile summary -


echo '
<!--span class="position">', (!empty($context['member']['group']) ? $context['member']['group'] : $context['member']['post_group']), '</span-->


Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

eloycartw

Thank you so much, I think this is what we need. But...  ;D

Our site Admin is on a well-deserved leave, and made me swear not to touch anything without rigorous and complete documentation. Presumably she does not wish to return relaxed and refreshed only to find we've burnt down the village.

Could you walk us through all the necessary steps from "Go to your cP and open PHPMyAdmin" to "Save/Close?"

Thank you in advance

eloycartw

Quote from: Doug Heffernan on May 12, 2022, 01:46:55 PM
Quote from: eloycartw on May 11, 2022, 08:20:26 AMHi,
How can we prevent a members membergroups from being displayed?

We are prototyping on MAMP 6.6, SMF 2.1 clean install, SMF prefixes. PHP 7.4.2, MySQL 5.7.34

Thank you

Hello. Do you mean the the post based membergroups?
Quote from: Doug Heffernan on May 12, 2022, 01:46:55 PMHello. Do you mean the the post based membergroups?

I think so. We want members to be treated equitably in the general discussions, without regard to any membergroups they may have asked to be assigned to.

Antechinus

#5
OK, the safest way to do this (burning villages generally being regarded as a bad thing) is to leave the templates alone, and hide the post groups with CSS for the moment. Just about impossible to break anything important that way. :)

So, what do you have access to, and know how to use? You can do this in the admin centre in a pinch, although really FTP or hosting control panel would be preferred.

ETA: This code can be added to the start or end of index.css as a temporary fix.

/* This is the primary assigned group. */
.user_info li.membergroup {
display: none !important;
}
/* These are the group icons (red, yellow, green, blue). */
.user_info li.icons {
display: none !important;
}
/* This is the post count group (Newbie, etc). */
.user_info li.postgroup {
display: none !important;
}
/* This is the number of posts they have made. */
.user_info li.postcount {
display: none !important;
}

Arantor

Or you could... just use configuration.

Step 1, delete all post count groups except the lowest one, rename it "Member", make sure it starts at 0 posts.

Step 2, any admins etc. assign the admin group as a secondary group in the profile rather than the primary group.

Everyone looks equal, no code changes.

Antechinus


Steve

@eloycartw, does Arantor's solution work for you? I notice you were here this morning but didn't respond to this. :)
DO NOT pm me for support!

eloycartw

Hi,
Yes, we tried out and it seems to work ok. In the long run we might prefer to modify the php file, but in the small trial this morning its fine.
Thank you!

Doug Heffernan

Glad to see that it worked for you. Marking this solved.

Advertisement: