• 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:

tommydamic68

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

ooooo.png

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

tommydamic68

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

Code:
<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}: " />
                </span>
            <xen:else />
It needs to be added here:

Code:
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>
        </div>
    </div>
 

tommydamic68

Well-known member
#7
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
 

tommydamic68

Well-known member
#11
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" />