Support Forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
themes-topic
How to Hide Badge Labels in Member List
Avatar
jim
Here and Now
Member
Pro Subscribers
Offline
Mar 27, 2019 - 4:06 pm

SimplePress codex documentation for sp_MemberListRank is great, but I don't see a way to hide the Special Rank badge label in spMembersViewDesktop (or Mobile) like I can in spTopicViewDesktop.

For example, I successfully hid the label for badges in Desktop Topic view:

sp_PostIndexUserRank('tagClass=spPostUserRank spCenter&showBadge=1&showTitle=0&hideIfSpecialRank=1');
sp_PostIndexUserSpecialRank('tagClass=spPostUserSpecialRank spCenter&showTitle=0');

But this clearly works differently in Desktop Member List view:

sp_ColumnStart('tagClass=spColumnSection spRight&width=19%');
sp_MemberListRank('ARGS-GO-HERE-RIGHT?', __sp('Forum Ranks'));
sp_ColumnEnd();

The same arguments do not work, and the list of arguments for sp_MemberListRank in the docs include no option for badgeTitle or anything that suggests an ability to hide the title/label for individual badges – like you can do with sp_PostIndexUserRank – and $label is clearly for displaying the "Forum Ranks" label above the list of badges.

Am I missing something?

Ideally, I want to hide the label if badge(s) exists for a user, however I need to display the label if no badge is assigned for the rank.

I'm using a Reboot child theme and got this working in Desktop and Mobile Topic views, but this Member List view is a bit more tricky. For example, in the screenshot attached, I want to hide labels for Special Rank badges shown, but display label for Forum Rank(s) with no badge.

Thanks in advance for any direction!

spMemberList.pngImage Enlarger

TripawdsSimple:Press powers the Tripawds Discussion Forums.

It's better to hop on three legs than to limp on four.

The Tripawds Blogs Community is made possible by The Tripawds Foundation.

Avatar
Simple Press
Admin
Offline
Mar 27, 2019 - 10:28 pm

You're right, that does not exist.  But we just added it.  You can see the commit in our code on github here: https://github.com/Simple-Pres.....c87584f2e9

That option will be available in the next version.  I can make you a pre-release .zip if you like but once you install it you can't go back to 6.0.6 (you can only move to newer versions).

If you feel comfortable you can also copy and paste the entire function inside the forum/content/sp-member-view-functions.php file from the github file (don't replace the entire file, just the single function!).

The argument is called 'title' (because the other similar arguments in this function does not have the word 'show' in them so used 'title' to maintain consistency inside the function.)

Thanks.

Avatar
jim
Here and Now
Member
Pro Subscribers
Offline
Mar 28, 2019 - 5:10 pm

Simple Press said
...that does not exist.  But we just added it...

Fantastic, I thought I may have just been missing something.

I'll play around with the function on our dev site, and will gladly wait for the update.

Thanks for the continued great work and support!

TripawdsSimple:Press powers the Tripawds Discussion Forums.

It's better to hop on three legs than to limp on four.

The Tripawds Blogs Community is made possible by The Tripawds Foundation.

Avatar
Simple Press
Admin
Offline
Mar 28, 2019 - 5:56 pm

Hi:

Thanks. Let me know how it goes on the dev site!

Avatar
jim
Here and Now
Member
Pro Subscribers
Offline
May 3, 2019 - 10:29 am

Simple Press said
Let me know how it goes...

Worked like a charm. Thanks again!

sp_MemberListRank('title=0', __sp('Forum Ranks'));

TripawdsSimple:Press powers the Tripawds Discussion Forums.

It's better to hop on three legs than to limp on four.

The Tripawds Blogs Community is made possible by The Tripawds Foundation.

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: 650
FidoSysop: 577
Conrad_Farlow: 531
fiddlerman: 358
Stefano Prete: 325
Member Stats:
Guest Posters: 620
Members: 17365
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10128
Posts: 79626