XF 2.1 Last poster username/avatar in mobile version

requo

Active member
Hello,
is there any modification or tutorial on how to viewt the latest poster in the mobile version in nodelist?

I have a very big demand for it on my forum and I can't do it in any way.
Can someone please guide me or inspire me with their solution?

Thank you for your help.
 
Solved.

mobile.webp

---
my solution:

1) template extra.less add:

Code:
.structItem-cell.structItem-cell--latest .MYmicroicon {display: none;}
@media (max-width: 650px) {
    .structItem-cell.structItem-cell--latest .structItem-minor:before {
        content: "\00A0\00B7\20";
        color: #7c9292;
        margin-right:1px;
    }
    .structItem-cell.structItem-cell--latest .structItem-minor {display: inline;}
    .structItem-cell.structItem-cell--latest .MYmicroicon {display: inline;}   
    .structItem-cell.structItem-cell--latest .MYmicroicon .avatar.avatar--xxs {width:14px;height:14px;}
}

2) template thread_list_macros

replace +- 180 line (part of 'div class="structItem-cell structItem-cell--latest"')

Code:
                <div class="structItem-minor">
                    <xf:if is="$xf.visitor.isIgnoring($thread.last_post_user_id)">
                        {{ phrase('ignored_member') }}
                    <xf:else />
                        <xf:username user="{$thread.LastPoster}" defaultname="{$thread.last_post_username}" />
                    </xf:if>
                </div>

to

Code:
                    <xf:if is="$xf.visitor.isIgnoring($thread.last_post_user_id)">
                        <span class="MYmicroicon"><xf:avatar user="{{ null }}" size="xxs" /><span>
                        {{ phrase('ignored_member') }}
                    <xf:else />
                        <span class="MYmicroicon"><xf:avatar user="{$thread.LastPoster}" defaultname="{$thread.last_post_username}" size="xxs" /></span>
                        <xf:username user="{$thread.LastPoster}" defaultname="{$thread.last_post_username}" />
                    </xf:if>

---

for me ok. :)
 
  • Like
Reactions: Gri
Top Bottom