Support Forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
general-topic
Forum Rank
Avatar
Paul M Jerard Jr
Member
sp_UserOfflineSmall Offline
Aug 25, 2015 - 9:52 am

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.pngImage Enlarger

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

members-issue1.pngImage Enlarger

 

Thanks!

Meredith

Avatar
Ike
Sawtry, UK
Member
Free Members
sp_UserOfflineSmall Offline
Aug 25, 2015 - 10:25 am

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!

Avatar
Paul M Jerard Jr
Member
sp_UserOfflineSmall Offline
Aug 25, 2015 - 12:07 pm

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!!

Avatar
Ike
Sawtry, UK
Member
Free Members
sp_UserOfflineSmall Offline
Aug 25, 2015 - 2:00 pm

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.

Avatar
Paul M Jerard Jr
Member
sp_UserOfflineSmall Offline
Aug 27, 2015 - 8:11 am

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

 

code-1.pngImage Enlarger

 

code-2.pngImage Enlarger

 

Forum-profile-1.pngImage Enlarger

Avatar
Ike
Sawtry, UK
Member
Free Members
sp_UserOfflineSmall Offline
Aug 27, 2015 - 10:06 am

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

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: 619
Members: 17361
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10127
Posts: 79625