A A A
Forum Scope


Match



Forum Options



Min search length: 3 characters / Max search length: 84 characters
Forum Login
Lost password?
general-topic
Turning off text user group when adding rank badges
...View Related Tags
Avatar
Todd Bockman
25 Posts
(Offline)
1
Apr 8, 2012 - 4:11 am
Print

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

19448 Posts
(Offline)
2
Apr 8, 2012 - 9:26 am
Print

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

Avatar
Todd Bockman
25 Posts
(Offline)
3
Apr 8, 2012 - 10:17 am
Print

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

19448 Posts
(Offline)
4
Apr 8, 2012 - 11:12 am
Print

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

16436 Posts
(Offline)
5
Apr 8, 2012 - 11:16 am
Print

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

19448 Posts
(Offline)
6
Apr 8, 2012 - 11:21 am
Print

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

16436 Posts
(Offline)
7
Apr 8, 2012 - 11:43 am
Print

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

andy-signature.png
YELLOW
SWORDFISH
Avatar
Todd Bockman
25 Posts
(Offline)
8
Apr 8, 2012 - 5:21 pm
Print

LOL, thanks guys.

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

 

Avatar
Brandon
U.S.

864 Posts
(Offline)
9
Apr 8, 2012 - 7:07 pm
Print

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
89 Posts
(Offline)
10
Mar 29, 2013 - 2:44 pm
Print

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: America/New_York
All RSSShow Stats
Administrators: Blues Dancer, Simple Press, SP Community Support
Top Posters:
Mr Papa: 19448
Ike: 2086
Brandon: 864
kvr28: 804
jim: 630
FidoSysop: 577
Conrad_Farlow: 531
fiddlerman: 358
Stefano Prete: 325
Newest Members:
BadSantaeni
Patrice Elizabeth
Caroline Norriss
Web team
Pavol Vrabec
Hélène CLEMENT
Forum Stats:
Groups: 7
Forums: 17
Topics: 10062
Posts: 79357

 

Member Stats:
Guest Posters: 607
Members: 16915
Moderators: 0
Admins: 3

Most Users Ever Online
499
Currently Online
Silvia Di Blasio
Guest(s)
8
Currently Browsing this Page

1 Guest(s)