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!
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.)
This post answers the topic
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!
Thanks. Let me know how it goes on the dev site!
Simple Press said
Let me know how it goes…
Worked like a charm. Thanks again!
sp_MemberListRank('title=0', __sp('Forum Ranks'));