XF 1.4 How to get info from Recent Threads?

Status
Not open for further replies.

sbj

Well-known member
Hello,

I have a template from an add-on (no support) and I want to show the date of the recent post.

I tried this:
Code:
{$thread.lastPostInfo.post_date}
and this:
Code:
<xen:datetime time="$thread.lastPostInfo.post_date" />
but both doesn't work.

What is the universal way of getting that info? I must say that I don't know much about coding, I assume I have to put also some specific classes.
Can someone help me?
 
Which add-on?

Regardless whether it is supported or not, the best place to post your question is in the thread, as it puts the question in context and other users may be able to help.
 
  • Like
Reactions: sbj
Which add-on?

Regardless whether it is supported or not, the best place to post your question is in the thread, as it puts the question in context and other users may be able to help.

The thing is my question is more of a general question than specific to one add-on. I want to understand/learn/know how it works to recent posts and then I will apply the same logic to a series of add-ons, you can find them here.
 
Not all parameters are available in all templates, so without knowing which add-on and template you are referring to, it is impossible to give an answer.
 
  • Like
Reactions: sbj
Not all parameters are available in all templates, so without knowing which add-on and template you are referring to, it is impossible to give an answer.
I see. I thought some parameters are global and can be used everywhere.
The template of the add-on is this:
Code:
<xen:if is="{$recentPosts} AND {$visitor.permissions.recentPostsGroupID.recentPostsID}">

<xen:require css="andy_recentposts.css" />
<xen:include template="preview_tooltip" />

<div class="section">
<div class="secondaryContent">

<h3>
<a href="{xen:link find-new/posts, '', 'recent=1'}" rel="nofollow">{xen:phrase recentposts_recent_posts}</a>
</h3>

<table class="recentposts">
  
    <xen:foreach loop="$recentPosts" value="$thread">
 
    <tr class="recentposts">

        <td class="recentposts_avatar_container">
        <xen:avatar user="$thread" size="s" img="true" class="recentposts_avatar"/>
        <xen:if is="{$thread.user_post_count}"><xen:avatar user="$visitor" size="s" img="true" class="recentposts_mini_me" title="{xen:phrase you_have_posted_x_messages_in_this_thread, 'count={xen:number $thread.user_post_count}'}" /></xen:if>
        </td>

        <td class="recentposts_thread_title"><a href="{xen:link threads/, $thread}"
        class="{xen:if $thread.hasPreview, PreviewTooltip}"
        data-previewUrl="{xen:if $thread.hasPreview, {xen:link threads/preview, $thread}}">{xen:helper wrap, $thread.title, 50}</a><br />

        <span class="recentposts_forum_title"><a href="{xen:link forums, $thread.forum}">{$thread.nodeTitle}</a></span></td>
      
    </tr>
  
    </xen:foreach>
  
</table>

</div>
</div>

And I want to replace this:
Code:
 <span class="recentposts_forum_title"><a href="{xen:link forums, $thread.forum}">{$thread.nodeTitle}</a></span>
with the recent date of the last post. But my tries didn't work.
 
That member is still active and the add-on is not marked as unmaintained so you will need to post in the add-on thread for support.
 
Status
Not open for further replies.
Top Bottom