Support Forum

Advanced Search
Forum Scope


Forum Options

Minimum search word length is 3 characters - maximum search word length is 84 characters
Removing text names/show badges only of user groups in profile displays (Reboot)
Kelly Brady
sp_UserOfflineSmall Offline
Jan 3, 2017 - 11:53 pm

profile-editing.pngImage Enlarger

Hello - I am using Reboot and have created a child theme per the instructions.

Most of my users get assigned to 1 user group, however a small number of users might be members of several user groups.  Almost all user groups have a custom rank badge assigned to them.

Using my child theme, I successfully made several changes to the user's profile display of user groups on their posts:

- Don't display the text name of any group(s) the user is a member of

- Display the custom rank badge(s) of any group(s) the user is a member of (if the user group doesn't have a badge, nothing is displayed)

However, I need to make these same changes to the user profile popup and full profile.  

In my screenshot below, the user belongs to 3 user groups, "curator", "CMS Faculty" and "Moderator".  Moderator has no custom rank badge. You can see on their post profile they show Curator and CMS Faculty badges.  But on the popup, it show the badges, the user group name as text, and the text for the level of "Moderator" and the user group "Moderators" which has no custom badge. 

I want to see ONLY custom rank badges on the user profile popup and full profile displays.

I copied spProfileShow.php and spProfilePopupShow.php into the appropriate child theme folder, and located sp_SectionStart('tagClass=spProfileShowAvatarSection spLeft', 'profileAvatarRank'); where the magic seems to happen.

I can block the text "Moderator" by commenting out the line:

#sp_UserForumRank('', $spProfileUser->rank);

However I lose both the text and forum rank badges (nothing is displayed) if I comment out:

#sp_UserMembership('', $spProfileUser->memberships);

Can you tell me where the code is located that let's me block display of the profile's user group text names but will still allow the user group rank badges, if present, to be displayed?



Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Jan 4, 2017 - 1:01 am

so you just want the badge and no title???   these are the three template functions at play:

                        sp_UserForumRank('', $spProfileUser->rank);
                        sp_UserSpecialRank('', $spProfileUser->special_rank);
                        sp_UserMembership('', $spProfileUser->memberships);

for all three, they have these couple of arguments:

        'showTitle'     => 1,
        'showBadge'     => 1,

which default to showing titles and badges... you can customize to not show titles by chaning showTitle to 0...  so,for example:

sp_UserForumRank('showTitle=0', $spProfileUser->rank);

and similarly for others (since all arguments are part of the first string passed to the template function...

Kelly Brady
sp_UserOfflineSmall Offline
Jan 4, 2017 - 1:03 am

Yes - just the badge, no titles.  Thanks for the quick response!  Trying this now...!


Kelly Brady
sp_UserOfflineSmall Offline
Jan 4, 2017 - 1:44 am

Ok - it worked!

I only modified sp_UserMembership by adding the showTitle=0 parameter.  This gets rid of all of the user group text names but leaves the badges.

FYI, When I use showTitle=0 with sp_UserForumRank, it does suppress the special "Moderator" text, but it then messes up the display of the UserMembership badges:

- In the ProfilePopup view, it removes the small space between the avatar photo and each badge, stacking them on top of each other and touching

- In the full Profile view, it removes the small space between the avatar photo, and the badges display side-by-side and touching just below the photo, also touching the photo.

No big deal with that; I am going to leave sp_UserForumRank with the defaults; only a couple members are a moderator and it is fine for just this text to show up on the profile when clicked on.

Thanks again for the quick help!


Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Jan 4, 2017 - 3:52 pm

Thanks for the information. I will open a ticket just to get this tested and see what is happening

Forum Timezone: Europe/Stockholm
Most Users Ever Online: 1170
Currently Online:
Guest(s) 1
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Mr Papa: 19448
Ike: 2086
Brandon: 864
kvr28: 804
jim: 633
FidoSysop: 577
Conrad_Farlow: 531
fiddlerman: 358
Stefano Prete: 325
Member Stats:
Guest Posters: 615
Members: 17335
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10105
Posts: 79544