Support Forum

Forum Rank

PJ Paul M Jerard Jr
Paul M Jerard Jr
Member

I was able to add the forum images for badges but on the front end the title of the Forum Rank Name is still showing.  I thought adding the image would replace the text.  It’s a little redundant. I like it the way you have it here- just image no text.

members-issue.png

 I don’t know where these are coming from, but I’d like to hide both.

members-issue1.png

 

Thanks!

Meredith

5 Answers

New Answer

IK Ike
Ike
Member

Good stuff so far..

As there are so many options for displaying information in the user section of a post it’s all controlled by template functions.

Not sure if you have a child theme there. If so, you will need to have a copy of spTopicViewDesktop.php in your templates > desktop folder. Open it up and take a look at ‘column 1 of the post row’ which starts on line 131.

Here are the relevant functions in the default template:

sp_PostIndexUserRank('tagClass=spPostUserRank spCenter&showBadge=1&hideIfSpecialRank=1');
sp_PostIndexUserSpecialRank('tagClass=spPostUserSpecialRank spCenter');
sp_PostIndexUserMemberships('tagClass=spPostUserMemberships spCenter');

Here are ours:

sp_PostIndexUserSpecialRank('tagClass=spPostUserSpecialRank spCenter&showTitle=0');
sp_PostIndexUserMemberships('tagClass=spPostUserMemberships spCenter&showTitle=0');

For starters, we don’t use sp_PostIndexUserRank, the function is removed so that eliminates one display of the users rank. Then where we use sp_PostIndexUserMemberships, we use the showTitle=0 argument which hides the text title leaving just the badge.

This isn’t the definitive way of doing it as there are lots of combinations, although it will result in the same display we have here.

As always, you can search each function by pasting the function name (i.e ‘sp_PostIndexUserMemberships’) in to the Codex search to see what arguments are available.

And of course if you don’t already have a child theme in place you will need to create one.

Hope that helps!

PJ Paul M Jerard Jr
Paul M Jerard Jr
Member

It did hide one of them, I can live with the other.  Thanks much.  Just an fyi to others, you can’t cheat and add this to the top level file spTopicView.php you’ll have to recreate the folder structure and add to both mobile and desktop.

 

Thanks!!

IK Ike
Ike
Member

Yes, forgot to add that! Child theme folder structure has to be exactly the same as the parent.

If you want to get rid of whatever is still left, post a screenshot and your code and we can take a look.

PJ Paul M Jerard Jr
Paul M Jerard Jr
Member

I think I have 2 topics for this, sorry for the dupe.

 

code-1.png

 

code-2.png

 

Forum-profile-1.png
IK Ike
Ike
Member

No problem, as an extension to the ranks question but a separate issue I’ll continue in the other thread.