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

XF 1.4 How to get info from Recent Threads?

Discussion in 'Styling and Customization Questions' started by sbj, Feb 3, 2015.

Thread Status:
Not open for further replies.
  1. sbj

    sbj Well-Known Member


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

    I tried this:
    and this:
    <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?
  2. Brogan

    Brogan XenForo Moderator Staff Member

    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.
    sbj likes this.
  3. sbj

    sbj Well-Known Member

    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.
  4. Brogan

    Brogan XenForo Moderator Staff Member

    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.
    sbj likes this.
  5. sbj

    sbj Well-Known Member

    I see. I thought some parameters are global and can be used everywhere.
    The template of the add-on is this:
    <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">
    <a href="{xen:link find-new/posts, '', 'recent=1'}" rel="nofollow">{xen:phrase recentposts_recent_posts}</a>
    <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 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>

    And I want to replace this:
     <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.
  6. Brogan

    Brogan XenForo Moderator Staff Member

    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.
Thread Status:
Not open for further replies.

Share This Page