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
Turning off text user group when adding rank badges
Avatar
Todd Bockman
Member
Free Members
sp_UserOfflineSmall Offline
Apr 8, 2012 - 4:11 am

I added a rank badge that is just the user group - like on this forum for the level.

It shows that, and below it still shows the text version of the user level. So I have badge showing "administrator" and below it the text saying "Administrator".

How do I get the text to not show below the badge?

Thank you!

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Apr 8, 2012 - 9:26 am

when you call the template tag, just add an argument of showTitle=0

Avatar
Todd Bockman
Member
Free Members
sp_UserOfflineSmall Offline
Apr 8, 2012 - 10:17 am

In English please, lol.

 

I know basic html and css, "call the template tag?"  Am I adding this part somewhere or changing it to "0"?

 

Thank you

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Apr 8, 2012 - 11:12 am

no worries...  in the file spTopicView.php of your sp theme, find this line:

                            sp_PostIndexUserRank('tagClass=spPostUserRank spCenter');

and change it to

                            sp_PostIndexUserRank('tagClass=spPostUserRank spCenter&showTitle=0');

to learn more about how themes work and template files and template tags, check out:  http://codex.simple-press.com/.....ex/themes/

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Apr 8, 2012 - 11:16 am

The topic view uses the appropriately named spTopicView.php template in your SP theme. You can edit this template using the theme editor editor.

If you look through the template you will see the top to bottom display elements of the topic page.

Locate the call to the template function sp_PostIndexUserSpecialRank(). If currently set as the we supply it then it will probably be:

sp_PostIndexUserSpecialRank('tagClass=spPostUserSpecialRank spCenter');

To hide the title you need to add an argument called 'showTitle' and set it to false - like this:

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

Note that ampersand in there and no spaces. That will instruct the title not to be displayed.

andy-signature.png
YELLOW
SWORDFISH
Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Apr 8, 2012 - 11:21 am

noticing that you said 'user group' in the original post... so if you are doing this with the badges for the usergroups, the template tag would be:

sp_PostIndexUserMemberships()

and its the same showTitle=0 argument...

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Apr 8, 2012 - 11:43 am

Well that's three different options! Take your pick! smile

andy-signature.png
YELLOW
SWORDFISH
Avatar
Todd Bockman
Member
Free Members
sp_UserOfflineSmall Offline
Apr 8, 2012 - 5:21 pm

LOL, thanks guys.

It's here (pic below) where it says Administrator below the badge ... what is that called?

 

Avatar
Brandon
U.S.
SP Wrangler
Free Members
sp_UserOfflineSmall Offline
Apr 8, 2012 - 7:07 pm

To not show the word 'Administrator' in your example that would be

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

in spTopicViiew.php around line #108

Avatar
Gomlers
Member
Free Members
sp_UserOfflineSmall Offline
Mar 29, 2013 - 2:44 pm

But what if you have:

1. Badges for moderators and administrators, and don't want to show the titles, you can put:

sp_PostIndexUserMemberships('tagClass=spPostUserMemberships&showBadge=1&showTitle=0 spCenter');

2. You have set up different User ranks, and want to show "New Member", "Very Active Member" and such. This line:

sp_PostIndexUserRank('tagClass=spPostUserRank spCenter' );

...also seems to trigger the Moderator-rank, even though I've removed it with "showBadge=1&showTitle=0" in the first example above.

See image:

Image Enlarger

Any Ideas?

 

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