Support Forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
requests-topic
Displaying small member avatars on topic listing?
Avatar
mike olson
Member
Offline
Mar 3, 2017 - 11:12 am

One of the features of ip.board that my memebrs really likes was the display of a mini avatar on the topic listing for the user who last replied. It gave an easy visual for people to understand who was taking part in the conversation. Is there a way to do that either through a plugin or modifying the theme? 

 

Here is an example:

 

EXAMPLE.pngImage Enlarger

Avatar
Yellow Swordfish
Glinton, England
SP Master
Offline
Mar 3, 2017 - 3:02 pm

Shouldn't be too difficult. That looks like Reboot theme - is that right? And are you using a child theme so it is safer to make changes?

andy-signature.png
YELLOW
SWORDFISH
Avatar
mike olson
Member
Offline
Mar 3, 2017 - 3:23 pm

Yellow Swordfish said
Shouldn't be too difficult. That looks like Reboot theme - is that right? And are you using a child theme so it is safer to make changes?  

Well the pic is from my ip.board forum but yes my new forum at http://vikefans.com/forums/ is using a child reboot theme. 

Avatar
Yellow Swordfish
Glinton, England
SP Master
Offline
Mar 3, 2017 - 5:13 pm

So - first task is to copy the template /templates/desktop/spForumViewDesktop./php from the Reboot theme folder into your child theme in the same location.

Now you need to make an edit to that template in your child theme. Look for the comment - 

# Column 3 of the forum row

at line (about) 198. Nite this is the second time this comment is made. The first is to do with subforums.

In the correct block of code, aftyer the column start you will find the function 

sp_TopicIndexReplyCount()

Track down 2 or 3 lines until you find the first call to sp_InsertBreak(). Immediately AFTER that line of code add the following new line:

sp_UserAvatar('tagClass=spLeft&size=25&context=user', $spThisTopic->last_user_id);

This needs to be entered EXACTLY as is shown here. But you can adjust the size (set to 25 pixels here) to whatever you prefer and what fits best.

You may want to do something with the mobile template as well. But of course, the layout is different.

andy-signature.png
YELLOW
SWORDFISH
Avatar
Yellow Swordfish
Glinton, England
SP Master
Offline
Mar 3, 2017 - 5:20 pm

Actually- you can probably improve that by making the size 35 and changing the next function:

sp_TopicIndexLastPost()

At the end of the argument list for that function you will find the argument...

&itemBreak= - -

If you change that to:

&itemBreak=<br />

It might give you a better display. Have a play.

andy-signature.png
YELLOW
SWORDFISH
Avatar
mike olson
Member
Offline
Mar 4, 2017 - 11:10 am

Thanks so much Yellowfish! I will try and make these mods today and see how it goes. Will update on my progress!

Avatar
mike olson
Member
Offline
Mar 4, 2017 - 12:16 pm

This worked great!!!! Thanks so much for your help. 

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
Offline
Mar 4, 2017 - 1:28 pm

np. glad we could 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