Support Forum

Server Rank Display in forums

DC darren corbell
darren corbell
Member

Hello all,

We have made custom images for all of the different custom server ranks that are displayed in our community.  However, it looks a bit odd with repeating the name in the image and right under it with the rank name.  Is there a way to just show the ranks image and not the ranks title name?

 

Here is the example from my forum.  I messed around on the FTO one and did I____________I to see what it would look like, but I much prefer it to just show to images and not the text.  Any ideas?

 

4 Answers

New Answer

YS Yellow Swordfish
Yellow Swordfish
Member

This is a simple template edit. The theme template in question is spTopicView.php in the /templates folder of your SP theme (or spTopicViewDesktop.php if using the Reboot theme).

A little over half way down you will find the display function responsible for special ranks data and it will look something like this:

sp_PostIndexUserSpecialRank('tagClass=spPostUserSpecialRank spCenter');

You need to add a new argument to this to repress the name display. So ot would change to:

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

and that will do it.

As always we recommend the use of a child theme to ensure changes are not lost when upgrading. There are now Child Theme Frameworks available to download for all of our themes to make this simple and full and extensive details can be found on our Codex – Creating a Child Theme page: https://simple-press.com/documentation/codex/themes/theme-basics/creating-a-child-theme/

DC darren corbell
darren corbell
Member

I have updated the spTopicView.php and changed the code to

 

 sp_PostIndexUserSpecialRank(‘tagClass=spPostUserSpecialRank spCenter&showTitle=0’);

 

the effect has not taken place on the forum as the names are still displaying.

IK Ike
Ike
Member

I’m not sure if it’s just because you’ve pasted the code there without using the syntax highlighter, but the quote marks (apostrophes) you have around the arguments are rich text (smart / curly), whereas they need to be plain text (straight).

YS Yellow Swordfish
Yellow Swordfish
Member

Actually worse because the first is a rich text/printers apostrophe and the closing one is not.

Also – let’s just confirm. I read this as being about the Special Forum Ranks. You actually called them ‘server ranks’ but I assumed you meant Special. Is it that you just mean the standard ranks that a user gets promoted to after X numbers of posts?