Support Forum

Displaying small member avatars on topic listing?

1
mike olson
Member
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

Yellow Swordfish
Glinton, England
Member
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?

mike olson
Member
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. 

Yellow Swordfish
Glinton, England
Member
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.

Yellow Swordfish
Glinton, England
Member
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.

mike olson
Member
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!

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

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

Mr Papa
Simi Valley, CA
Member
Free Members
Mar 4, 2017 - 1:28 pm

np. glad we could help!

1