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
Remove Forum Rank Text and Usergroup in Post Profile
Avatar
Wendell
Member
sp_UserOfflineSmall Offline
Jan 12, 2016 - 2:56 am

since i already have a forum rank badge, would like to remove the forum rank text and the usergroup as well in the post profile (under the avatar)... how do i do it?

 

     

remove the text 'Reserve' and 'Members'.

would also like to rename 'Forum Posts' to simply 'Posts'.

 

thanks. 🙂

Avatar
Ike
Sawtry, UK
Member
Free Members
sp_UserOfflineSmall Offline
Jan 12, 2016 - 9:54 am

Hey Wendell,

It's pretty straight forward to remove these elements but it does involve you setting up a child theme so these changes are not lost next time Reboot theme updates. Start off by downloading the free Reboot Child Theme Framework from the store and installing it following the instructions on the Creating a Child Theme page - Scroll down and see the section 'Child Theme Frameworks'.

You will then need to copy in the template spTopicViewDesktop.php from:

sp-resources > forum-themes > reboot > templates > desktop > spTopicViewDesktop.php

to your child themes templates folder i.e:

sp-resources > forum-themes > yourchildtheme > templates > desktop > spTopicViewDesktop.php

So, working from your child themes spTopicViewDesktop.php template - To remove the user rank text you will need to locate the function 'sp_PostIndexUserRank' roughly on line 137 and add the 'showTitle' argument set to 0. The function should then look like:

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

To remove the usergroup memberships display you will need to comment out the following function directly after 'sp_PostIndexUserMemberships' with a hash so it will then appear as:

#sp_PostIndexUserMemberships('tagClass=spPostUserMemberships spCenter');

And lastly, 2 lines down from there you should find 'sp_PostIndexUserPosts', and you can then change the label at the end of the argument removing the word 'Forum' so it should then appear:

sp_PostIndexUserPosts('tagClass=spPostUserPosts spCenter', __sp('Posts: %COUNT%'));

That should do it!

Avatar
Wendell
Member
sp_UserOfflineSmall Offline
Jan 12, 2016 - 10:09 am

@ike 

thanks so much for explaining it to me in great detail, got what i wanted. 🙂

 

just a follow-up question, is it possible to have image custom fields inserted there? i run a sports forum and members want to have their team logos in their post profiles.

Avatar
Ike
Sawtry, UK
Member
Free Members
sp_UserOfflineSmall Offline
Jan 12, 2016 - 10:13 am

No problem, happy to help!

Avatar
Wendell
Member
sp_UserOfflineSmall Offline
Jan 12, 2016 - 10:15 am

like this @ike 

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Jan 12, 2016 - 8:22 pm

you might look at the custom profile fields plugin which allows users to add info for custom fields you define... then you can show it where ever you want...  though not sure it does an image per se... you might have to add the logic when displaying for converting their team to an image...

Avatar
Wendell
Member
sp_UserOfflineSmall Offline
Jan 28, 2016 - 9:59 am

hi @ike 

just have a follow-up question, still with regards to the user profile in posts.

for mobile view, how do i arrange the fields so that the rank is underneath the username and number of posts is underneath the rank - with no empty spaces.

 

Image Enlarger 

the 'Admin' should be under 'Kapitan' and the 'Posts: 25' under the rank (Admin) - with no empty spaces.

what should i do? thanks.

Avatar
Ike
Sawtry, UK
Member
Free Members
sp_UserOfflineSmall Offline
Jan 28, 2016 - 10:35 am

For starters I take it you're using Unified for mobile? If so you will have to create a child theme for Unified using the same method detailed above.

Next you will need the Unified spTopicView.php copied over to your Unified child themes templates folder. Now you have to be more careful in Unified as the templates are not split into 'Desktop' and 'Mobile', and instead both desktop and mobile code is in the template.

The rule you need to follow here is that anything under:

if($spDevice == 'mobile') {

Is mobile.

Anything under

if($spDevice != 'mobile') {

Is NOT mobile.

Navigate to line 163 and you have the start of the mobile topic view user area but you will have to be careful as underneath the username you have location. If you are happy to loose location you can replace it with the rank function from line 195. The whole column should then look like:

sp_ColumnStart('tagClass=spAvatarSection spLeft&width=76%&height=15px');
    sp_UserAvatar('tagClass=spPostUserAvatar spLeft&context=user', $spThisPostUser);
    sp_PostIndexUserName('tagClass=spPostUserName spLeft');
    sp_InsertLineBreak();
    sp_PostIndexUserRank('tagClass=spPostUserRank spRight&showBadge=0&hideIfSpecialRank=1');
    sp_InsertLineBreak();
    sp_PostIndexUserPosts('tagClass=spPostUserPosts spLeft', __sp('Forum Posts: %COUNT%'));
sp_ColumnEnd();
Avatar
Wendell
Member
sp_UserOfflineSmall Offline
Jan 28, 2016 - 11:04 am

did it, thanks ike! laugh

Avatar
Ike
Sawtry, UK
Member
Free Members
sp_UserOfflineSmall Offline
Jan 28, 2016 - 4:12 pm

No problem, happy to help!

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