Support Forum

WPAchievements Ranks

120 Answers

New Answer

FI fiddlerman
fiddlerman
Member

Just thought that I would share what has come out of our badges lately.

We now have 10 badges for “Special Ranks” and our users are extremely pleased with it. I still have plenty of work ahead of me to update all users badges (why do we bring these things upon ourselves?) but it’s exactly the solution that I was looking for. I don’t think we could have automated this particular process.

Check it out: Badges

FI fiddlerman
fiddlerman
Member

Hey guys,

Question about special ranks.

I have unique Forum Rank Names for # of Posts For Rank, plus badges which the members earn for achieving various goals.

The Custom Rank Badges (images) work great and everyone is happy with them but the Forum Rank Names based on # of posts don’t show up. Instead it shows stuff like Members Regulars, or Member Members…… IOW, the Automatic User Group Membership name shows up. Doesn’t look very good. I would like to have the Badges and the Forum Rank Name which I created show up on the Topic View.

Would appreciate a solution. 🙂

http://fiddlerman.com/forum/

IK Ike
Ike
Member

Hey fiddlerman,

I think it’s just the way I’m reading what you’ve asked, but I’m not sure I 100% follow but here goes!

Are you still using the same code as you pasted above in post #101? If so, is it because your sp_PostIndexUserSpecialRank function has the argument showTitle=0?

FI fiddlerman
fiddlerman
Member

Yes Ike, same code. What should I use for showTitle=?

Thanks 🙂

IK Ike
Ike
Member

Basically showTitle will display a text label for the usergroup / special rank etc.. showTitle=1 will display a text label as well as an image, and showTitle=0 will not.

Again, hopefully that’s the right one!

FI fiddlerman
fiddlerman
Member

That would be easy to check. 🙂

The only thing is that I don’t want the other text that has been showing up such as Members Regulars and such.

Thanks, I’ll give it a shot.

FI fiddlerman
fiddlerman
Member

That didn’t work 🙁

It just showed the titles of the Badges which is not good.

Screen-Shot-2015-06-29-at-11.50.02-AM.pngScreen-Shot-2015-06-29-at-11.51.38-AM-1.png
IK Ike
Ike
Member

OK, sorry..

Those labels (Members, Regulars etc..) should be coming from sp_PostIndexUserMemberships

I can’t see that in your code from the last page, but can you confirm that you do have that function in there? If so check the showTitle argument. My guess would be that it’s either set to 1, or the showTitle argument isn’t present. If the latter, you could add it i.e:

sp_PostIndexUserMemberships('tagClass=spPostUserMemberships spCenter&showTitle=0');
FI fiddlerman
fiddlerman
Member

I tried changing:

sp_PostIndexUserMemberships(‘tagClass=spPostUserMemberships spCenter’);
to
sp_PostIndexUserMemberships(‘tagClass=spPostUserMemberships spCenter&showTitle=1’);

and

sp_PostIndexUserMemberships(‘tagClass=spPostUserMemberships spCenter&showTitle=0’);

Still couldn’t see the speical Forum Rank Name.
I don’t have the PostIndexUserMemberships code in my new code though. It’s located earlier.

sp_ColumnEnd();
sp_InsertBreak();
sp_PostIndexUserSpecialRank(‘tagClass=spPostUserSpecialRank spCenter&stacked=0&showTitle=0&imgClass=spUserBadge’);
sp_SectionEnd(‘tagClass=spClear’);

IK Ike
Ike
Member

sp_PosIndexUserMemberships is responsible for outputting the ‘Members’ and ‘Regulars’ labes, so using showTitle=0 was supposed to hide the ‘Members’ and ‘Regulars’ labels as you mentioned you wanted to do, did it do that?

I think there is some confusion here which is easily done.. In your original question you said ‘but the Forum Rank Names based on # of posts don’t show up’ – These are just standard forum ranks not special forum ranks, although I think I was looking at the wrong thing when I first read it myself..

I’ve just re-read the last page and must have missed this. If you are showing special ranks then standard forum ranks are hidden by default. You will need to add the argument hideIfSpecialRank to sp_PostIndexUserRank to get them to show up.. i.e:

sp_PostIndexUserRank('tagClass=spPostUserRank spCenter&hideIfSpecialRank=0');
FI fiddlerman
fiddlerman
Member

OK, I’m back to this problem. Updated my stacked theme and tried to edit the spTopicView.php file to show our badges in a row. I’ve been able to fix it in the past using the guide below but the new stacked theme is different. Please help!!!

__________________________________________

Find the section that starts with the comment: # User Info post row. You will see that it starts with the function sp_SectionStart(‘tagClass=spUserSection’); and ends with sp_SectionEnd(‘tagClass=spClear’);

Within that section locate the call to:

 

sp_PostIndexUserSpecialRank(‘tagClass=spPostUserSpecialRank spCenter’);

 

We need to remove this line of code as it needs to be both modified and moved to a new location.

Now at the bottom of the section we need to add a break AND the function we have removed but with different arguments. So – the end of this section needs to look like this:

 

sp_ColumnEnd();
sp_InsertBreak();
sp_PostIndexUserSpecialRank(‘tagClass=spPostUserSpecialRank spCenter&stacked=0&showTitle=0&imgClass=spUserBadge’);
sp_SectionEnd(‘tagClass=spClear’);

This will centre your badges and remove the text label (necessary at the moment I am afraid). If you want them to be ranged over on the left then you will need to use:

sp_ColumnEnd();
sp_InsertBreak();
sp_PostIndexUserSpecialRank(‘tagClass=spPostUserSpecialRank spCenter&stacked=0&showTitle=0&imgClass=spUserBadge spLeft’);
sp_SectionEnd(‘tagClass=spClear’);

YS Yellow Swordfish
Yellow Swordfish
Member

Just because I am up to my eyeballs with things at the moment and I might have to set up test data and spend some time etc., to see what this is all about – can you shed a little light on what you mean by the latest ‘stacked’ theme is different? Might help me ascertain what I am supposed to be looking for.

If you make edits every update why do you not make a child theme?

and perhaps I should ask what this has to do with the WP Achievements plugin… bit confused on that one?

FI fiddlerman
fiddlerman
Member

The latest stacked theme update(1.2.17) has been changed to the point that I cannot find something similar enough to this to be able to replace and get the same result.

sp_ColumnEnd();
sp_InsertBreak();
sp_PostIndexUserSpecialRank(‘tagClass=spPostUserSpecialRank spCenter&stacked=0&showTitle=0&imgClass=spUserBadge’);
sp_SectionEnd(‘tagClass=spClear’);

There is much new code and I have failed in my experiments editing the stacked theme file.

If it clearer, I can PM, or paste here, the edited stacked theme spTopicView.php code that I used from version 1.2.16