Support Forum

Show avatar in the topics list

WS WE WE Shoot SL
WE WE Shoot SL
Member

Hi there, first of all, sorry for the broken english. I´m gonna try explain my problem properly.

What I want it´s to show user avatar in the rows of the Topics list “spForumView.php”, where the user name is shown for the first and last topic.

I tried this, but every time it´s showing me the same avatar. Thanks!!

 

# Column 5 of the forum row
# ———————————————————————-
sp_ColumnStart(‘tagClass=spColumnSection spRight&width=16%&height=50px’);
sp_TopicIndexLastPost(‘iconClass=spIcon spRight&nicedate=1&date=0&time=0&stackdate=0’, __sp(‘Last Post’));
sp_UserAvatar(‘tagClass=spPostUserAvatar spCenter&context=user’);
sp_ColumnEnd();

# Column 4 of the forum row sp_UserAvatar(‘tagClass=spPostUserAvatar spCenter&context=user’, $spThisPostUser);
# ———————————————————————-
sp_ColumnStart(‘tagClass=spColumnSection spRight&width=16%&height=50px’);
sp_TopicIndexFirstPost(‘iconClass=spIcon spRight&nicedate=1&date=0&time=0&stackdate=0’, __sp(‘First Post’));
sp_UserAvatar(‘tagClass=spPostUserAvatar spCenter&context=user’);
sp_ColumnEnd();

3 Answers

New Answer

YS Yellow Swordfish
Yellow Swordfish
Member

You need to pass some user data as a second parameter. In these cases the user _ID will suffice.

These need to be $spThisTopic->first_user_id and $spThisTopic->last_user_id respectively.