Support Forum

Displaying small member avatars on topic listing?

MO mike olson
mike olson
Member

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.png

7 Answers

New Answer

YS Yellow Swordfish
Yellow Swordfish
Member

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?

MO mike olson
mike olson
Member

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. 

YS Yellow Swordfish
Yellow Swordfish
Member

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.

YS Yellow Swordfish
Yellow Swordfish
Member

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.

MO mike olson
mike olson
Member

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

MO mike olson
mike olson
Member

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