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
How to show user group badges?
Avatar
Todd Bockman
Member
Free Members
sp_UserOfflineSmall Offline
Apr 9, 2012 - 4:11 am

I uploaded badges in the components - forum ranks admin panel ... selected the user group badge under manage user groups.

Badges aren't showing up for the various user groups?

How do I get them to show up so they will automatically be applied when new users register to the different user groups?  I have different badges for the different groups.

Thank you!

Todd

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Apr 9, 2012 - 6:24 am

First up - my apologies for the confusion yesterday on the related thread so let's try and get it right today!

You will need to edit the spTopicView.php template in your SP theme - you can use the theme editor for this.

Because this a new optional feature introduced in V5 you will need to add to the template. Locate the call in that template to the template function: sp_PostIndexUserSpecialRank().

Underneath this - add this line of code:

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

This will show badged linked to the members User Group and will inhibit the display of the User group name.

As always we recommend that you create your own SP theme so that any customisation is not lost during a future update. (http://codex.simple-press.com/.....g-a-theme/)

Hopefully I got it right this morning!

andy-signature.png
YELLOW
SWORDFISH
Avatar
Todd Bockman
Member
Free Members
sp_UserOfflineSmall Offline
Apr 9, 2012 - 6:57 am

Ok, that's better ... almost.

I used the code from yesterday to turn off the title, and then used the code you gave above also.

Got that working, now ... with the title=0 it leaves a blank line space above the badge (more than one line), how do I get rid of that.

ALSO, how do I get my title and badge on Administrator to work.  I don't have a user group and see no options for adding it.  I can turn it on in special ranks, but the title remains under the badge.

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

You would need to use 'Special Ranks' for admins. The title can be tuined off the same way with - showTitle=0

I am not seeing a line/space issue on my test site. if you can give me a link to a specific page that shows this I can take a look to see what the cause might be.

andy-signature.png
YELLOW
SWORDFISH
Avatar
Todd Bockman
Member
Free Members
sp_UserOfflineSmall Offline
Apr 9, 2012 - 9:00 am

Where is the special ranks for admins located, same place?  Do it the same way?

 

The forum is in a member protected site, here is a screen shot of a test member showing the extra gap above the badge and the code I changed per your instructions.

 

Thanks!

 

I realized that part of the big gap was I didn't have a location in the profile info, I added that in this pic and it still has a slight gap there, on the forum here it's not gapping that much.  Have a look, see what you think.

 

 

Image Enlarger

 

Update:  I just noticed on my profile here it is the same gap, was looking at yours where there is little gap ... strange.

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Apr 9, 2012 - 9:40 am

You create special form ranks as and when you want them. See the forum admin > components > forum ranks - middle section. Just create one with the name you want - save it - then upload the badge and set it to the new rank and then use the add members tool to add the admins.

I can only really help with the 'gap' diagnosis by having the actual site as I can inspect it using development tools (Firebug with Firefox for example) which informs you of CSS being applied to any element. You can do this yourself of course - most up to date browsers have these dev tools built in. I was going to look for evidence that maybe your WP theme is having an effect on the padding.

andy-signature.png
YELLOW
SWORDFISH
Avatar
Todd Bockman
Member
Free Members
sp_UserOfflineSmall Offline
Apr 9, 2012 - 10:34 am

PM'd you login info.

Todd

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Apr 9, 2012 - 12:06 pm

Curious. I can see what us happening but am not sure why. Still - I can investigate that at leisure.

To remove the empty space - try this. Go to the forum admin > components > forum ranks. In the top panel do you have anything defined? If so remove them. If not - then you could go back to your spTopicView template - locate the call to sp_PostIndexUserRank() and just comment it out as you are not using it.

Actually I CAN see why the problem is so we will get that fixed up.

andy-signature.png
YELLOW
SWORDFISH
Avatar
Todd Bockman
Member
Free Members
sp_UserOfflineSmall Offline
Apr 9, 2012 - 3:42 pm

Ok, thank you, I appreciate that.  

Even if I am not using it, would kind of hate to remove code in case I ever want to use it in the future.

There is a new member rank defined for up to the first 2 post ... not needed, I am taking it out now so take a look at it again before doing anything.  

Appreciate it Andy.

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Apr 9, 2012 - 10:40 pm

well, if you removed it, you could always look back in one of our themes to get it back...  but will get it fixed up...

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: 620
Members: 17365
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10128
Posts: 79626