A A A
Forum Scope


Match



Forum Options



Min search length: 3 characters / Max search length: 84 characters
Forum Login
Lost password?
Avatar
jim
Here and Now

630 Posts
(Offline)
1
Mar 27, 2019 - 4:06 pm
Print

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

Attachments

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
392 Posts
(Offline)
2
Mar 27, 2019 - 10:28 pm
Print

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.

sp_Check
This post answers the topic
Avatar
jim
Here and Now

630 Posts
(Offline)
3
Mar 28, 2019 - 5:10 pm
Print

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
392 Posts
(Offline)
4
Mar 28, 2019 - 5:56 pm
Print

Hi:

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

Avatar
jim
Here and Now

630 Posts
(Offline)
5
May 3, 2019 - 10:29 am
Print

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: America/New_York
All RSSShow Stats
Administrators: Blues Dancer, Simple Press, SP Community Support
Top Posters:
Mr Papa: 19448
Ike: 2086
Brandon: 864
kvr28: 804
jim: 630
FidoSysop: 577
Conrad_Farlow: 531
fiddlerman: 358
Stefano Prete: 325
Newest Members:
BadSantaeni
Patrice Elizabeth
Caroline Norriss
Web team
Pavol Vrabec
Hélène CLEMENT
Forum Stats:
Groups: 7
Forums: 17
Topics: 10062
Posts: 79357

 

Member Stats:
Guest Posters: 607
Members: 16915
Moderators: 0
Admins: 3

Most Users Ever Online
499
Currently Online
Guest(s)
14
Currently Browsing this Page

1 Guest(s)