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

XF 1.1 How make something show in a thread only if the have posts in it.

Discussion in 'XenForo Questions and Support' started by Matthew Hawley, Mar 11, 2013.

  1. Matthew Hawley

    Matthew Hawley Well-Known Member

    How do I make something show in a thread to user only if the user has posts in the thread?
  2. Onimua

    Onimua Well-Known Member

    I'm assuming you're planning on showing it above the posts? If it's not within the posts, you could try this:
    <xen:foreach loop="$posts" value="$posted">
        <xen:if is="{$visitor.user_id} == {$posted.user_id}">
            <xen:set var="$hasPosted">true</xen:set>
    <xen:if is="{$hasPosted}">Message to user</xen:if>
    It's not the best solution, but it's the only way I see possible at the moment. Otherwise, you'd need an add-on to modify the thread/post fetching to include whether or not the user has posted in a thread (this is only done for thread listing for use with the mini-me avatar).

Share This Page