• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 1.2 Last poster {xen:


Well-known member
I am trying to find the code for the last poster in a thread or message - see image where the arrow is pointing.


This doesn't seem to work, am i missing something? {xen:username user="$boardTotals.latestUser" />


Well-known member
Look in the node_forum_level_2 template.
What code do I use?

<xen:hook name="node_forum_level_2_before_lastpost" params="{xen:array 'forum={$forum}'}" />

        <div class="nodeLastPost secondaryContent">
            <xen:if is="{$forum.privateInfo}">
                <span class="noMessages muted">({xen:phrase private})</span>
            <xen:elseif is="{$forum.lastPost.date}" />
                <span class="lastThreadTitle"><span>{xen:phrase latest}:</span> <a href="{xen:link posts, $forum.lastPost}" title="{$forum.lastPost.title}">{$forum.lastPost.title}</a></span>
                <span class="lastThreadMeta">
                    <span class="lastThreadUser"><xen:if is="{xen:helper isIgnored, $forum.last_post_user_id}">{xen:phrase ignored_member}<xen:else /><xen:username user="$forum.lastPost" /></xen:if>,</span>
                    <xen:datetime time="$forum.lastPost.date" class="muted lastThreadDate" data-latest="{xen:phrase latest}: " />
            <xen:else />
It needs to be added here:

div class="meta">
            {xen:phrase post_by}: <xen:username user="$post" />, <xen:datetime time="{$post.post_date}" />, {xen:phrase x_replies, 'count={xen:number $thread.reply_count}'}, {xen:phrase views} {$thread.view_count},
            {xen:phrase in_forum}: <a href="{xen:link forums, $forum}">{$forum.title}</a>


Well-known member
Why will this not give me last poster info?

{xen:phrase last_post}: <xen:username user="$forum.lastPost" /> it just gives me Last Post:

Screen Shot 2013-11-05 at 5.26.59 AM.png


Well-known member
no, just made a bunch of goobly code on site, with just {xen:helper 'dump', $forum} by itself and like this:

{xen:helper 'dump', $forum}: <xen:username user="$forum.lastPost" />