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
WPAchievements Ranks
Avatar
fiddlerman
Member
Free Members
sp_UserOfflineSmall Offline
Oct 31, 2014 - 9:19 pm

I'm guessing there is a good solution that someone will be super happy to help me out with. :)

"The richest person is not the one who has the most, but the one who needs the least."


Learn to Play Violin for Free - http://www.fiddlerman.com

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Oct 31, 2014 - 11:23 pm

Its going to take more time than I have tonight... but this weekend, I should have time...

Avatar
fiddlerman
Member
Free Members
sp_UserOfflineSmall Offline
Nov 1, 2014 - 12:19 am

You're the man Steve. :)

Thanks!!!

"The richest person is not the one who has the most, but the one who needs the least."


Learn to Play Violin for Free - http://www.fiddlerman.com

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Nov 1, 2014 - 2:22 am

me? nah... ;)   bet Andy beats me to it tomorrow... evil

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Nov 1, 2014 - 5:33 am

I can work this up for you... But - if you are likely to have multiple badges for a user like this then you will have to lose the text underneath each badge. We can perhaps address that later but for now it would be necessary. So - is that OK?

Also - how will you want these? Ranged over on the left or centered?

andy-signature.png
YELLOW
SWORDFISH
Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Nov 1, 2014 - 5:58 am

Let's just got for it and you can see what you think. I don't recall whether you already have a custom theme but after this you will need one - either custom or child.

So the theme template to edit - in the /templates folder of your SP theme - is spTopicView.php.

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');

instead....

andy-signature.png
YELLOW
SWORDFISH
Avatar
fiddlerman
Member
Free Members
sp_UserOfflineSmall Offline
Nov 3, 2014 - 4:59 pm

Thanks Andy.

I tried to the best of my ability to get it right but all the posts got screwed up every time so I had to revert to default.

No problem finding the code but

Yellow Swordfish said

<br />

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:

Where do we need to move it? Where at the "end of this section"? I tried in several places but no success.

Thanks a million for doing this. :) I look forward to getting it to work.

"The richest person is not the one who has the most, but the one who needs the least."


Learn to Play Violin for Free - http://www.fiddlerman.com

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Nov 3, 2014 - 8:40 pm

when you copied Andy's code, did you use the raw code button and copy?  if not, you might have copied dorked up (charset stuff) single or double quotes...

Avatar
fiddlerman
Member
Free Members
sp_UserOfflineSmall Offline
Nov 3, 2014 - 9:13 pm

Definitely raw code button. :)

Thanks

"The richest person is not the one who has the most, but the one who needs the least."


Learn to Play Violin for Free - http://www.fiddlerman.com

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Nov 3, 2014 - 9:20 pm

so please post the changes you made so we can see if we can spot the issue...

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