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 do i edit user information displayed in messages/posts?
Avatar
critterGuide.ca
Canada
Member
sp_UserOfflineSmall Offline
Dec 6, 2015 - 9:13 pm

hi everyone,

i want to clean up some of the info displayed (see image attached) in the reply.

i want to replace it with badges and reputation but canot find the place where do change what that section displays. for instance here in the forum we do not see allot of words just some icons...picture attached. want to remove this

Moderator-moderators-moderate-member-etc and all other info from there:)

Untitled.pngImage Enlargeruser post/reply will be here 🙂

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Dec 6, 2015 - 9:22 pm

all the information is output via template tags... so you can remove, add or change the information...

in this case, it looks like you are displaying forum ranks (new member, moderator, etc) and usergroup memberships (member, moderators, etc)... if you have defined badges for the ranks and usergroups they will already display (by default in our themes)...

any changes to display information is done in your sp theme in use...  in this case, since the this is in topic view, you would edit the spTopicView.php (for default, might be similar but different in other themes) template file and make your changes...  in particular, these two calls:

                                    sp_PostIndexUserRank('tagClass=spPostUserRank spCenter');
                                    sp_PostIndexUserMemberships('tagClass=spPostUserMemberships spCenter');

as I said, by default, badges are already displayed if you have them defined on forum - components - forum ranks and forum - usergroups - manage usergroups...  if you just want to remove ranks and memberships, just remove the template tag calls...  you can just display titles or badges or both... 

for what else you want to do, you will have to be more specific...

and dont forget, as always, before editing an sp theme we provide, we strongly recommend you make a child theme or a custom theme...

Avatar
critterGuide.ca
Canada
Member
sp_UserOfflineSmall Offline
Dec 6, 2015 - 10:21 pm

this is what im trying to find out.. in the codex it said edit these stuff but i cant see anything in the theme editor.. i think i am looking at the wrong spot?

THIS IS spTopicView.php

<?php
# --------------------------------------------------------------------------------------
#
# Simple:Press Template
# Theme : Reboot
# Template : Topic View
# Author : Simple:Press
# Version : 1.0
#
# The 'Topic' template is used to display the Topic/Post Index Listing.
#
# This template makes a call to either the desktop or mobile template
# depending on what device the forum is being viewed through.
#
# To edit the Topic view for desktop use- templates/desktop/spTopicViewDesktop.php
# To edit the Topic view for mobile use- templates/mobile/spTopicViewMobile.php
# --------------------------------------------------------------------------------------

global $spDevice;

if ( $spDevice == 'mobile' ) {
sp_load_template('mobile/spTopicViewMobile.php');
} else {
sp_load_template('desktop/spTopicViewDesktop.php');
}

?>

that is the whole thing i have in there... so where do i edit?

much simpler to have a checkbox 😛 show name/badge/both.. i want only badges..

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Dec 6, 2015 - 10:28 pm

sorry, but a checkbox just isnt possible for every display option... we would have many tens of thousands of checkboxes... just not practical or feasible...

as I mentioned, I was giving you the layout for default...   it appears you are using reboot theme which separates a page view into mobile and desktop... so you simply need to drill down one level as indicated by the sp_load_template() call...

however, its probably not available in the editor (its based on the wp theme editor) cannot go deep enough in levels... but editing the file directly as strongly discouraged and you should make a child theme or a custom them or you will lose your changes on updates...

so if you just want badges (again, you have to define and they would show already), you can turn off tiles by changing to:

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

the difference being both added showTitle=0 to the function arguments...

Avatar
critterGuide.ca
Canada
Member
sp_UserOfflineSmall Offline
Dec 10, 2015 - 1:57 am

Fair enough 🙂 

Will play around with all that.

Thanks.

Avatar
critterGuide.ca
Canada
Member
sp_UserOfflineSmall Offline
Dec 10, 2015 - 5:43 pm

Another question on the same subject.

The user info mentioned above is displayed above the post/reply by default in mobile and desktop.

In mobile it makes sense as it is only part of the info and shorter but on the desktop version its way too long in my opinion to be above the post.

Can I move it to be on the right side of the post only in desktop and not in mobile/tablet mode?

Avatar
Ike
Sawtry, UK
Member
Free Members
sp_UserOfflineSmall Offline
Dec 10, 2015 - 6:27 pm

Sure, as Steve explained above Reboot splits it's templates between mobile and desktop. All you'd need to do would be to make changes to spTopicViewDesktop.php.

spTopicViewMobile.php will remain untouched and mobile will continue to function as it did before.

Avatar
critterGuide.ca
Canada
Member
sp_UserOfflineSmall Offline
Dec 10, 2015 - 9:42 pm

perfect! all working 🙂

copied the templates from the reboot into the child folders and edited the lines

and i will have to do it again after the update i guess.  as its ot in the stock-child stuff... 🙂

thank you guys. cool

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Dec 11, 2015 - 4:13 am

If you are changing items in a child theme then they are not overwritten during a theme update. The whole point of a child theme is to protect users changes from loss. The same way that WordPress child themes work in fact.

andy-signature.png
YELLOW
SWORDFISH
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: 617
Members: 17359
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10125
Posts: 79620